PdfTilingPattern Class
A tiling pattern consists of a small graphical figure called a pattern cell. Painting with the pattern replicates the cell at fixed horizontal and vertical intervals to fill an area. The effect is as if the figure were painted on the surface of a clear glass tile, identical copies of which were then laid down in an array covering the area and trimmed to its boundaries. This process is called tiling the area.
public sealed class PdfTilingPattern : PdfPattern
Public NotInheritable Class PdfTilingPattern
Inherits PdfPattern
- Inheritance:
- System.ObjectPdfTilingPattern
Constructors
PdfTilingPattern(PdfDocument, PdfSize)
Initializes a new instance of the PdfTilingPattern class.
public PdfTilingPattern(PdfDocument document, PdfSize size)
Public Sub New(document As PdfDocument, size As PdfSize)
Parameters
document
- PdfDocument
The PdfDocument associated with the PdfTilingPattern.
size
- PdfSize
The size of the PdfTilingPattern cell.
Exceptions
- System.ArgumentNullException
document
is null.
PdfTilingPattern(PdfDocument, Boolean, Int32, PdfRectangle, Double, Double)
Initializes a new instance of the PdfTilingPattern class.
public PdfTilingPattern(PdfDocument document, bool isColored, int tilingType, PdfRectangle boundingBox, double xStep, double yStep)
Public Sub New(document As PdfDocument, isColored As Boolean, tilingType As Integer, boundingBox As PdfRectangle, xStep As Double, yStep As Double)
Parameters
document
- PdfDocument
The PdfDocument associated with the PdfTilingPattern.
isColored
- System.Boolean
Determines how the color of the pattern cell shall be specified: true for Colored tiling pattern or false for Uncolored tiling pattern.
tilingType
- System.Int32
A code that controls adjustments to the spacing of tiles relative to the device pixel grid.
boundingBox
- PdfRectangle
The bounding box of the PdfTilingPattern cell whose coordinates are in the pattern coordinate system. This bounding box shall be used to clip the pattern cell.
xStep
- System.Double
The desired horizontal spacing between pattern cells, measured in the pattern coordinate system. xStep
may differ from the width of the pattern cell implied by the boundingBox
. This allows tiling with irregularly shaped figures. xStep
may be either positive or negative but shall not be zero.
yStep
- System.Double
The desired vertical spacing between pattern cells, measured in the pattern coordinate system. yStep
may differ from the height of the pattern cell implied by the boundingBox
. This allows tiling with irregularly shaped figures. yStep
may be either positive or negative but shall not be zero.
Exceptions
- System.ArgumentNullException
document
or boundingBox
is null.
- System.ArgumentException
xStep
or yStep
is either zero, System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
Properties
BoundingBox
(Required) An array of four numbers in the pattern coordinate system giving the coordinates of the left, bottom, right, and top edges, respectively, of the pattern cell's bounding box. These boundaries shall be used to clip the pattern cell.
Property Value
An array of four numbers in the pattern coordinate system giving the coordinates of the left, bottom, right, and top edges, respectively, of the pattern cell's bounding box.
See Also
Content
Gets the content of this tiling pattern.
Property Value
The content of this tiling pattern.
See Also
IsColored
(Required) A value that determines how the color of the pattern cell shall be specified:
- true for Colored tiling pattern. The pattern's content stream shall specify the colors used to paint the pattern cell. When the content stream begins execution, the current color is the one that was initially in effect in the pattern’s parent content stream. This is similar to the definition of the pattern matrix; see 8.7.2, "General Properties of Patterns".
- false for Uncolored tiling pattern. The pattern's content stream shall not specify any color information. Instead, the entire pattern cell is painted with a separately specified color each time the pattern is used. Essentially, the content stream describes a stencil through which the current color shall be poured. The content stream shall not invoke operators that specify colors or other color-related parameters in the graphics state; otherwise, an error occurs (see 8.6.8, "Color Operators"). The content stream may paint an image mask, however, since it does not specify any color information (see 8.9.6.2, "Stencil Masking").
Property Value
- System.Boolean
A value that determines how the color of the pattern cell shall be specified.
See Also
XStep
(Required) The desired horizontal spacing between pattern cells, measured in the pattern coordinate system.
note
XStep and YStep may differ from the dimensions of the pattern cell implied by the BoundingBox entry. This allows tiling with irregularly shaped figures.
XStep and YStep may be either positive or negative but shall not be zero.
Property Value
- System.Double
The desired horizontal spacing between pattern cells, measured in the pattern coordinate system.
Exceptions
- System.ArgumentException
Value is either zero, System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
See Also
YStep
(Required) The desired vertical spacing between pattern cells, measured in the pattern coordinate system.
note
XStep and YStep may differ from the dimensions of the pattern cell implied by the BoundingBox entry. This allows tiling with irregularly shaped figures.
XStep and YStep may be either positive or negative but shall not be zero.
Property Value
- System.Double
The desired vertical spacing between pattern cells, measured in the pattern coordinate system.
Exceptions
- System.ArgumentException
Value is either zero, System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
See Also
Methods
SetBoundingBox(Double, Double, Double, Double)
Sets the BoundingBox.
public void SetBoundingBox(double left, double bottom, double right, double top)
Public Sub SetBoundingBox(left As Double, bottom As Double, right As Double, top As Double)
Parameters
left
- System.Double
The left X coordinate of the BoundingBox.
bottom
- System.Double
The bottom Y coordinate of the BoundingBox.
right
- System.Double
The right X coordinate of the BoundingBox.
top
- System.Double
The top Y coordinate of the BoundingBox.
Inherited Properties
Document | Gets the PdfDocument associated with this PdfContentResource or null if no PdfDocument is associated with this PdfContentResource. (Inherited from PdfContentResource) |
Metadata | (Optional; PDF 1.4) A metadata stream containing metadata for the component. (Inherited from PdfObject) |
PatternType | (Required) A code identifying the type of pattern that this PdfPattern describes. (Inherited from PdfPattern) |
Transform | (Optional) An array of six numbers specifying the pattern matrix (see 8.7.2, "General Properties of Patterns"). Default value: the identity matrix [1 0 0 1 0 0]. (Inherited from PdfPattern) |