PdfMeshShading Class
Represents a base class for mesh-based shadings PdfFreeTriangleMeshShading, PdfLatticeTriangleMeshShading, PdfCoonsPatchMeshShading, and PdfTensorPatchMeshShading.
public abstract class PdfMeshShading : PdfShading, IEnumerable
Public MustInherit Class PdfMeshShading
Inherits PdfShading
Implements IEnumerable
- Inheritance:
- System.ObjectPdfMeshShading
- Derived
Implements
Properties
BitsPerComponent
(Required) The number of bits used to represent each color component. The value shall be 1, 2, 4, 8, 12, or 16.
Property Value
- System.Int32
The number of bits used to represent each color component.
Exceptions
- System.ArgumentOutOfRangeException
Argument must be one of the following values: 1, 2, 4, 8, 12, or 16.
See Also
BitsPerCoordinate
(Required) The number of bits used to represent each vertex or geometric coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32.
Property Value
- System.Int32
The number of bits used to represent each vertex or geometric coordinate.
Exceptions
- System.ArgumentOutOfRangeException
Argument must be one of the following values: 1, 2, 4, 8, 12, 16, 24, or 32.
See Also
Decode
(Required) A collection of PdfNumberRanges specifying how to map vertex or geometric coordinates and color components into the appropriate ranges of values. The decoding method is similar to that used in image dictionaries (see 8.9.5.2, "Decode Arrays"). The ranges shall be specified as follows:
[(xmin xmax) (ymin ymax) (c1,min c1,max) … (cn,min cn,max)]
Only one pair of c values shall be specified if a Function entry is present.
public PdfNumberRangeCollection Decode { get; set; }
Public Property Decode As PdfNumberRangeCollection
Property Value
A collection of PdfNumberRanges specifying how to map vertex or geometric coordinates and color components into the appropriate ranges of values.
Exceptions
- System.ArgumentNullException
Value is null.
- System.ArgumentException
The number of PdfNumberRanges is invalid. It must be 2 + ColorSpace.ColorantCount if the Function is null or 3 otherwise.
See Also
Function
(Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n is the number of color components in the shading dictionary's color space). If this entry is present, the color data for each vertex shall be specified by a single parametric variable rather than by n separate color components. The designated function(s) shall be called with each interpolated value of the parametric variable to determine the actual color at each point. Each input value shall be forced into the range interval specified for the corresponding color component in the shading dictionary's Decode array. Each function's domain shall be a superset of that interval. If the value returned by the function for a given color component is out of range, it shall be adjusted to the nearest valid value.
This entry shall not be used with an Indexed color space.
tip
Use the static method CreateFunction(IList<PdfShadingColor>) to create an interpolation function from two or more PdfShadingColors.
public IList<PdfFunction> Function { get; set; }
Public Property Function As IList(Of PdfFunction)
Property Value
- System.Collections.Generic.IList<PdfFunction>
A 1-in, n-out function or an array of n 1-in, 1-out functions.
Remarks
The color components part of the Decode entry is automatically updated to the appropriate ranges of values.
Exceptions
- System.ArgumentNullException
Value is empty or any of its elements is null.
- System.ArgumentException
The number of functions is not 1 and is not equal to the ColorSpace.ColorantCount or the function's input dimensionality is invalid (the Domain's Count should be 1) or the function's output dimensionality is invalid (if the number of functions is 1, then it should be equal to the ColorSpace.ColorantCount; otherwise, it should be 1) for any function contained in the PdfFunction list.
- System.InvalidOperationException
- System.InvalidOperationException
The Function can be set only to an empty PdfMeshShading.
See Also
Inherited Properties
Background | (Optional) A color appropriate to the ColorSpace, specifying a single background color. If present, this color 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. noteIn the opaque imaging model, the effect is as if the painting operation were performed twice: first with the background color and then with the shading. noteThe background color is applied only when the shading is used as part of a PdfShadingPattern, not when it is painted directly with the PdfShadingContent operator. (Inherited from PdfShading) |
BoundingBox | (Optional) A rectangle giving the left, bottom, right, and top coordinates, respectively, of 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. (Inherited from PdfShading) |
ColorSpace | (Required) The color space in which color values shall be expressed. This may be any device, CIE-based, or special color space except a Pattern space. See 8.7.4.4, "Color Space: Special Considerations" for further information. (Inherited from PdfShading) |
Document | Gets the PdfDocument associated with this PdfContentResource or null if no PdfDocument is associated with this PdfContentResource. (Inherited from PdfContentResource) |
IsAntiAlias | (Optional) A flag indicating whether to filter the shading function to prevent aliasing artifacts. noteThe 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. Default value: false. (Inherited from PdfShading) |
Metadata | (Optional; PDF 1.4) A metadata stream containing metadata for the component. (Inherited from PdfObject) |
ShadingType | (Required) The shading type. (Inherited from PdfShading) |
Inherited Methods
CreateFunction(System.Collections.Generic.IList<PdfShadingColor>) | Creates an interpolation function from the specified list of PdfShadingColors. Two The function's Domain is set from the Offset of the first and the last PdfShadingColor. (Inherited from PdfShading) |
SetBoundingBox(System.Double, System.Double, System.Double, System.Double) | Sets the BoundingBox. (Inherited from PdfShading) |