GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfTilingPattern Class

    Namespace:
    GemBox.Pdf.Content.Patterns
    Assembly:
    GemBox.Pdf.dll

    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.

    • C#
    • VB.NET
    public sealed class PdfTilingPattern : PdfPattern
    Public NotInheritable Class PdfTilingPattern
        Inherits PdfPattern
    Inheritance:
    Object
    PdfObject
    PdfContentResource
    PdfPattern
    PdfTilingPattern

    Constructors

    PdfTilingPattern(PdfDocument, PdfSize)

    Initializes a new instance of the PdfTilingPattern class.

    • C#
    • VB.NET
    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
    ArgumentNullException

    document is null.

    ArgumentException

    size's Width or Height is zero.

    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.

    • C#
    • VB.NET
    public PdfRectangle BoundingBox { get; set; }
    Public Property BoundingBox As PdfRectangle
    Property Value
    PdfRectangle

    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
    PDF Specification ISO 32000-1:2008, section '8.7.3 Tiling Patterns'

    Content

    Gets the content of this tiling pattern.

    • C#
    • VB.NET
    public PdfContent Content { get; }
    Public ReadOnly Property Content As PdfContent
    Property Value
    PdfContent

    The content of this tiling pattern.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.7.3 Tiling Patterns'

    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").
    • C#
    • VB.NET
    public bool IsColored { get; set; }
    Public Property IsColored As Boolean
    Property Value
    Boolean

    A value that determines how the color of the pattern cell shall be specified.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.7.3 Tiling Patterns'

    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 bezero.

    • C#
    • VB.NET
    public double XStep { get; set; }
    Public Property XStep As Double
    Property Value
    Double

    The desired horizontal spacing between pattern cells, measured in the pattern coordinate system.

    Exceptions
    ArgumentException

    Value is either zero, NaN, NegativeInfinity or PositiveInfinity.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.7.3 Tiling Patterns'

    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 bezero.

    • C#
    • VB.NET
    public double YStep { get; set; }
    Public Property YStep As Double
    Property Value
    Double

    The desired vertical spacing between pattern cells, measured in the pattern coordinate system.

    Exceptions
    ArgumentException

    Value is either zero, NaN, NegativeInfinity or PositiveInfinity.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.7.3 Tiling Patterns'

    Methods

    SetBoundingBox(Double, Double, Double, Double)

    Sets the BoundingBox.

    • C#
    • VB.NET
    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
    Double

    The left X coordinate of the BoundingBox.

    bottom
    Double

    The bottom Y coordinate of the BoundingBox.

    right
    Double

    The right X coordinate of the BoundingBox.

    top
    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)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    Examples

    Patterns example
    Content Streams and Resources example

    See Also

    PDF Specification ISO 32000-1:2008, section '8.7.3 Tiling Patterns'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.