Class Shading
A shading specifies details of a particular gradient fill, including the type of shading to be used, the geometry of the area to be shaded, and the geometry of the gradient fill. Various shading types are available, depending on the value of the dictionary's ShadingType entry.
public abstract class Shading
- Inheritance
-
Shading
- Derived
- Inherited Members
Constructors
Shading(ShadingType, bool, DictionaryToken, ColorSpaceDetails, PdfRectangle?, double[])
Create a new Shading.
protected Shading(ShadingType shadingType, bool antiAlias, DictionaryToken shadingDictionary, ColorSpaceDetails colorSpace, PdfRectangle? bbox, double[] background)
Parameters
shadingType
ShadingTypeantiAlias
boolshadingDictionary
DictionaryTokencolorSpace
ColorSpaceDetailsbbox
PdfRectangle?background
double[]
Properties
AntiAlias
The shading operators sample shading functions at a rate determined by the resolution of the output device. Aliasing can occur if the function is not smooth—that is, if it has a high spatial frequency relative to the sampling rate. Anti-aliasing can be computationally expensive and is usually unnecessary, since most shading functions are smooth enough or are sampled at a high enough frequency to avoid aliasing effects. Anti-aliasing may not be implemented on some output devices, in which case this flag is ignored.
public bool AntiAlias { get; }
Property Value
BBox
The shading's bounding box. The coordinates shall be interpreted in the shading's target coordinate space. If present, this bounding box shall be applied as a temporary clipping boundary when the shading is painted, in addition to the current clipping path and any other clipping boundaries in effect at that time.
public PdfRectangle? BBox { get; }
Property Value
Background
An array of colour components appropriate to the colour space, specifying a single background colour value. If present, this colour shall be used, before any painting operation involving the shading, to fill those portions of the area to be painted that lie outside the bounds of the shading object.
public double[] Background { get; }
Property Value
- double[]
ColorSpace
The colour space in which colour values shall beexpressed. This may be any device, CIE-based, or special colour space except a Pattern space.
public ColorSpaceDetails ColorSpace { get; }
Property Value
Functions
The shading's function(s), if any.
public abstract PdfFunction[] Functions { get; }
Property Value
ShadingDictionary
The dictionary defining the shading.
public DictionaryToken ShadingDictionary { get; }
Property Value
ShadingType
The shading type.
public ShadingType ShadingType { get; }
Property Value
Methods
Eval(params double[])
Convert the input values using the functions of the shading.
public double[] Eval(params double[] input)
Parameters
input
double[]
Returns
- double[]