Table of Contents

Class PdfPattern.Tiling

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

Wrapper that represents tiling pattern of color space.

public class PdfPattern.Tiling : PdfPattern
Inheritance
PdfPattern.Tiling
Inherited Members

Remarks

Wrapper that represents tiling pattern of color space. This pattern consists of a small graphical figure (cells). Painting with the pattern replicates the cell at fixed horizontal and vertical intervals to fill an area. The pattern cell can include graphical elements such as filled areas, text, and sampled images. Its shape need not be rectangular, and the spacing of tiles can differ from the dimensions of the cell itself. The appearance of the pattern cell shall be defined by a content stream containing the painting operators needed to paint one instance of the cell

Constructors

Tiling(float, float)

Creates a new Tiling Pattern instance.

public Tiling(float width, float height)

Parameters

width float

the width of the pattern cell's bounding box

height float

the height of the pattern cell's bounding box

Remarks

Creates a new Tiling Pattern instance.

By default the pattern will be colored.

Tiling(float, float, bool)

Creates a new Tiling Pattern instance.

public Tiling(float width, float height, bool colored)

Parameters

width float

the width of the pattern cell's bounding box

height float

the height of the pattern cell's bounding box

colored bool

defines whether the Tiling Pattern will be colored or not

Tiling(float, float, float, float)

Creates a new Tiling Pattern instance.

public Tiling(float width, float height, float xStep, float yStep)

Parameters

width float

the width of the pattern cell's bounding box

height float

the height of the pattern cell's bounding box

xStep float

the desired horizontal space between pattern cells

yStep float

the desired vertical space between pattern cells

Remarks

Creates a new Tiling Pattern instance.

By default the pattern will be colored.

Tiling(float, float, float, float, bool)

Creates a new Tiling Pattern instance.

public Tiling(float width, float height, float xStep, float yStep, bool colored)

Parameters

width float

the width of the pattern cell's bounding box

height float

the height of the pattern cell's bounding box

xStep float

the desired horizontal space between pattern cells

yStep float

the desired vertical space between pattern cells

colored bool

defines whether the Tiling Pattern will be colored or not

Tiling(Rectangle)

Creates a new Tiling instance.

public Tiling(Rectangle bbox)

Parameters

bbox Rectangle

the pattern cell's bounding box

Remarks

Creates a new Tiling instance.

By default the pattern will be colored.

Tiling(Rectangle, bool)

Creates a new Tiling instance.

public Tiling(Rectangle bbox, bool colored)

Parameters

bbox Rectangle

the pattern cell's bounding box

colored bool

defines whether the Tiling Pattern will be colored or not

Tiling(Rectangle, float, float)

Creates a new Tiling instance.

public Tiling(Rectangle bbox, float xStep, float yStep)

Parameters

bbox Rectangle

the pattern cell's bounding box

xStep float

the desired horizontal space between pattern cells

yStep float

the desired vertical space between pattern cells

Remarks

Creates a new Tiling instance.

By default the pattern will be colored.

Tiling(Rectangle, float, float, bool)

Creates a new Tiling instance.

public Tiling(Rectangle bbox, float xStep, float yStep, bool colored)

Parameters

bbox Rectangle

the pattern cell's bounding box

xStep float

the desired horizontal space between pattern cells

yStep float

the desired vertical space between pattern cells

colored bool

defines whether the Tiling Pattern will be colored or not

Tiling(PdfStream)

Creates new instance from the PdfStream object.

public Tiling(PdfStream pdfObject)

Parameters

pdfObject PdfStream

the PdfStream that represents Tiling Pattern.

Remarks

Creates new instance from the PdfStream object. This stream should have PatternType equals to 1.

Methods

Flush()

public override void Flush()

GetBBox()

Gets the pattern cell's bounding box.

public virtual Rectangle GetBBox()

Returns

Rectangle

pattern cell's bounding box.

Remarks

Gets the pattern cell's bounding box. These boundaries shall be used to clip the pattern cell.

GetResources()

Gets the Tiling Pattern's resources.

public virtual PdfResources GetResources()

Returns

PdfResources

the Tiling Pattern's resources

GetTilingType()

Gets the tiling type.

public virtual int GetTilingType()

Returns

int

int value of PdfPattern.Tiling.TilingType

GetXStep()

Gets the desired horizontal space between pattern cells.

public virtual float GetXStep()

Returns

float

the desired horizontal space between pattern cells

GetYStep()

Gets the desired vertical space between pattern cells.

public virtual float GetYStep()

Returns

float

the desired vertical space between pattern cells

IsColored()

Checks if this pattern have colored paint type.

public virtual bool IsColored()

Returns

bool

true if this pattern's paint type is COLORED and false otherwise.

SetBBox(Rectangle)

Sets the pattern cell's bounding box.

public virtual void SetBBox(Rectangle bbox)

Parameters

bbox Rectangle

pattern cell's bounding box to set.

Remarks

Sets the pattern cell's bounding box. These boundaries shall be used to clip the pattern cell.

SetColored(bool)

Sets the paint type.

public virtual void SetColored(bool colored)

Parameters

colored bool

if true then the paint type will be set as COLORED , and UNCOLORED otherwise.

SetTilingType(int)

Sets the tiling type.

public virtual void SetTilingType(int tilingType)

Parameters

tilingType int

int value of PdfPattern.Tiling.TilingType to set.

SetXStep(float)

Sets the desired horizontal space between pattern cells.

public virtual void SetXStep(float xStep)

Parameters

xStep float

the desired horizontal space between pattern cells

SetYStep(float)

Sets the desired vertical space between pattern cells.

public virtual void SetYStep(float yStep)

Parameters

yStep float

the desired vertical space between pattern cells