本文整理汇总了C#中PdfDirectObject.Resolve方法的典型用法代码示例。如果您正苦于以下问题:C# PdfDirectObject.Resolve方法的具体用法?C# PdfDirectObject.Resolve怎么用?C# PdfDirectObject.Resolve使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PdfDirectObject
的用法示例。
在下文中一共展示了PdfDirectObject.Resolve方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Wrap
public static ILayerNode Wrap(
PdfDirectObject baseObject
)
{
if(baseObject == null)
return null;
PdfDataObject baseDataObject = baseObject.Resolve();
if(baseDataObject is PdfDictionary)
return Layer.Wrap(baseObject);
else if(baseDataObject is PdfArray)
return Layers.Wrap(baseObject);
else
throw new ArgumentException(baseDataObject.GetType().Name + " is NOT a valid layer node.");
}
示例2: Wrap
/**
<summary>Wraps the specified base object into a pattern object.</summary>
<param name="baseObject">Base object of a pattern object.</param>
<returns>Pattern object corresponding to the base object.</returns>
*/
public static Pattern Wrap(
PdfDirectObject baseObject
)
{
if(baseObject == null)
return null;
PdfDataObject dataObject = baseObject.Resolve();
PdfDictionary dictionary = GetDictionary(dataObject);
int patternType = ((PdfInteger)dictionary[PdfName.PatternType]).RawValue;
switch(patternType)
{
case PatternType1:
return new TilingPattern(baseObject);
case PatternType2:
return new ShadingPattern(baseObject);
default:
throw new NotSupportedException("Pattern type " + patternType + " unknown.");
}
}
示例3: AfterClone
public override void AfterClone(
Cloner cloner,
PdfArray parent,
int index,
PdfDirectObject item
)
{
PdfDictionary annotation = (PdfDictionary)item.Resolve();
if(annotation.ContainsKey(PdfName.FT))
{cloner.context.Document.Form.Fields.Add(Field.Wrap(annotation.Reference));}
}