Table of Contents

Class PdfPattern

Namespace
iText.Kernel.Pdf.Colorspace
Assembly
itext.kernel.dll

Dictionary wrapper that represent special type of color space, that uses pattern objects as the equivalent of colour values instead of the numeric component values used with other spaces.

public abstract class PdfPattern : PdfObjectWrapper<PdfDictionary>
Inheritance
PdfPattern
Derived
Inherited Members

Remarks

Dictionary wrapper that represent special type of color space, that uses pattern objects as the equivalent of colour values instead of the numeric component values used with other spaces. A pattern object shall be a dictionary or a stream, depending on the type of pattern. For mor information see paragraph 8.7 in ISO-32000-1.

Constructors

PdfPattern(PdfDictionary)

Wraps the passed PdfDictionary.

protected PdfPattern(PdfDictionary pdfObject)

Parameters

pdfObject PdfDictionary

the PdfDictionary that represent Pattern

Methods

Flush()

To manually flush a PdfObject behind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference.

public override void Flush()

Remarks

To manually flush a PdfObject behind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference. Basically this means that before flushing you need to explicitly call MakeIndirect(PdfDocument). For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation.

GetMatrix()

Gets a transformation matrix that maps the pattern’s internal coordinate system to the default coordinate system of the pattern’s parent content stream.

public virtual PdfArray GetMatrix()

Returns

PdfArray

pattern matrix

Remarks

Gets a transformation matrix that maps the pattern’s internal coordinate system to the default coordinate system of the pattern’s parent content stream. The concatenation of the pattern matrix with that of the parent content stream establishes the pattern coordinate space, within which all graphics objects in the pattern shall be interpreted.

GetPatternInstance(PdfDictionary)

Creates the instance wrapper of correct type from the PdfDictionary

public static PdfPattern GetPatternInstance(PdfDictionary pdfObject)

Parameters

pdfObject PdfDictionary

the PdfDictionary that represent Pattern

Returns

PdfPattern

new wrapper instance.

IsWrappedObjectMustBeIndirect()

protected override bool IsWrappedObjectMustBeIndirect()

Returns

bool

SetMatrix(PdfArray)

Sets a transformation matrix that maps the pattern’s internal coordinate system to the default coordinate system of the pattern’s parent content stream.

public virtual void SetMatrix(PdfArray matrix)

Parameters

matrix PdfArray

pattern matrix to set

Remarks

Sets a transformation matrix that maps the pattern’s internal coordinate system to the default coordinate system of the pattern’s parent content stream. The concatenation of the pattern matrix with that of the parent content stream establishes the pattern coordinate space, within which all graphics objects in the pattern shall be interpreted.