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

    Show / Hide Table of Contents

    PdfShadingPattern Class

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

    Shading patterns (PDF 1.3) provide a smooth transition between colors across an area to be painted, independent of the resolution of any particular output device and without specifying the number of steps in the color transition.

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

    Constructors

    PdfShadingPattern(PdfDocument, PdfShading)

    Initializes a new instance of the PdfShadingPattern class.

    • C#
    • VB.NET
    public PdfShadingPattern(PdfDocument document, PdfShading shading)
    Public Sub New(document As PdfDocument, shading As PdfShading)
    Parameters
    document
    PdfDocument

    The PdfDocument associated with the PdfShadingPattern.

    shading
    PdfShading

    The shading.

    Remarks

    If shading is associated with another PdfDocument, this constructor will automatically clone it and associate the clone with the current PdfDocument.

    Exceptions
    System.ArgumentNullException

    document or shading is null.

    Properties

    Shading

    (Required) A shading object defining the shading pattern's gradient fill.

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

    A shading object defining the shading pattern's gradient fill.

    Remarks

    If PdfShading value that is being set is associated with another PdfDocument, this property setter will automatically clone it and associate the clone with the current PdfDocument.

    Exceptions
    System.ArgumentNullException

    Value is null.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.7.4 Shading Patterns'

    Inherited Properties

    Document

    Gets the PdfDocument associated with this PdfContentResource or null if no PdfDocument is associated with this PdfContentResource.

    (Inherited from PdfContentResource)

    IsColored

    Gets a value indicating whether the PdfPattern is colored.

    (Inherited from PdfPattern)

    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

    Shadings example

    See Also

    PDF Specification ISO 32000-1:2008, section '8.7.4 Shading Patterns'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.