Skip to content

PDFAxialShading

Namespace: O2S.Components.PDF4NET.Graphics

Defines an axial (type 2) shading.

public class PDFAxialShading : PDFShading

Inheritance ObjectPDFShadingPDFAxialShading

Remarks

Axial shadings define a color blend that varies along a linear axis between two endpoints and extends indefinitely perpendicular to that axis.

Constructors

PDFAxialShading()

Initializes a new PDFAxialShading object.

public PDFAxialShading()

Properties

AntiAlias

Gets or sets a value indicating whether to filter the shading function to prevent aliasing artifacts.

public bool AntiAlias { get; set; }

Property Value

Boolean
If true, the output device will antialias the shading output.


ColorSpace

Gets or sets the shading color space.

public PDFColorSpace ColorSpace { get; set; }

Property Value

PDFColorSpace
The color space in which color values are expressed.


Domain

Gets or sets the shading domain.

public Double[] Domain { get; set; }

Property Value

Double[]
An array of two numbers [t0 t1] specifying the limiting values of a parametric variable t.

Exceptions

ArgumentOutOfRangeException
Thrown when the domain array length is not equal to 2.

Remarks

The variable is considered to vary linearly between these two values as the color gradient varies between the starting and ending points of the axis. The variable t becomes the input argument to the shading function.


EndColor

Gets or sets the shading end color.

public PDFColor EndColor { get; set; }

Property Value

PDFColor
The shading end color.

Remarks

The PDFAxialShading.StartColor and EndColor can be set only when the shading uses an exponential function (PDFExponentialFunction).


EndPoint

Gets or sets the shading end point.

public PDFPoint EndPoint { get; set; }

Property Value

PDFPoint
The end point of the shading axis.


ExtendEnd

Gets or sets a value indicating whether to extend shading beyond the ending point.

public bool ExtendEnd { get; set; }

Property Value

Boolean
If true, the shading will be extended beyond the ending point.


ExtendStart

Gets or sets a value indicating whether to extend shading beyond the starting point.

public bool ExtendStart { get; set; }

Property Value

Boolean
If true, the shading will be extended beyond the starting point.


Function

Gets or sets the shading function.

public PDFFunction Function { get; set; }

Property Value

PDFFunction
A 1-in, n-out function, where n is the number of color components in the shadins's color space

Remarks

The function is called with values of the parametric variable t in the domain defined by the PDFAxialShading.Domain property.


StartColor

Gets or sets the shading start color.

public PDFColor StartColor { get; set; }

Property Value

PDFColor
The shading start color.

Remarks

The StartColor and PDFAxialShading.EndColor can be set only when the shading uses an exponential function (PDFExponentialFunction).


StartPoint

Gets or sets the shading start point.

public PDFPoint StartPoint { get; set; }

Property Value

PDFPoint
The start point of the shading axis.