Shading is a class that represents a flat interface around all PDF shading types:
-
In Function-based (type 1) shadings, the color at every point in
the domain is defined by a specified mathematical function. The function need
not be smooth or continuous. This is the most general of the available shading
types, and is useful for shadings that cannot be adequately described with any
of the other types.
-
Axial shadings (type 2) define a color blend along a line between two points,
optionally extended beyond the boundary points by continuing the boundary
colors.
-
Radial shadings (type 3) define a color blend that varies between two circles.
Shadings of this type are commonly used to depict three-dimensional spheres
and cones.
-
Free-form Gouraud-shaded triangle mesh shadings (type 4) and lattice gouraud
shadings (type 5) are commonly used to represent complex colored and shaded
three-dimensional shapes. The area to be shaded is defined by a path composed entirely
of triangles. The color at each vertex of the triangles is specified, and a technique
known as Gouraud interpolation is used to color the interiors. The interpolation
functions defining the shading may be linear or nonlinear.
Coons patch mesh shadings (type 6) are constructed from one or more color
patches, each bounded by four cubic Bézier curves.
A Coons patch generally has two independent aspects:
-
Colors are specified for each corner of the unit square, and bilinear
interpolation is used to fill in colors over the entire unit square
-
Coordinates are mapped from the unit square into a four-sided patch whose
sides are not necessarily linear. The mapping is continuous: the corners
of the unit square map to corners of the patch and the sides of the unit
square map to sides of the patch.
-
Tensor-product patch mesh shadings (type 7) are identical to type 6
(Coons mesh), except that they are based on a bicubic tensor-product
patch defined by 16 control points, instead of the 12 control points
that define a Coons patch. The shading Patterns dictionaries representing
the two patch types differ only in the value of the Type entry and
in the number of control points specified for each patch in the data stream.
Although the Coons patch is more concise and easier to use, the tensor-
product patch affords greater control over color mapping.
Inheritance Hierarchy
Namespace:
pdftron.PDF
Assembly:
pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax public sealed class Shading : IClosable
Public NotInheritable Class Shading
Implements IClosable
public ref class Shading sealed : IClosable
pdftron.PDF.Shading = function();
Type.createClass(
'pdftron.PDF.Shading',
null,
Windows.Foundation.IClosable);
The Shading type exposes the following members.
Constructors
| Name | Description |
---|
| Shading | Create a Shading from the given SDF/Cos object listed under /Shading entry
in the page Resource dictionary.
|
TopMethods
| Name | Description |
---|
| Close | |
| Create | Create a Shading from the given SDF/Cos object listed under /Shading entry
in the page Resource dictionary.
|
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
| GetAntialias | Gets the antialias.
|
| GetBackground | An color point represented in base color space specifying a single
background color value. If present, this color is 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 itself.
In the opaque imaging model, the effect is as if the painting operation were
performed twice: first with the background color and then again with the
shading.
|
| GetBaseColorSpace | Gets the base color space.
|
| GetBBox | Gets the bounding box.
|
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
| GetSDFObj | Gets the SDFObj.
|
| GetType | Gets the Type of the current instance. (Inherited from Object.) |
| GetType(Obj) | Gets shading type from shading dictionary.
|
| HasBackground | Checks for background.
|
| HasBBox | Checks for bounding box.
|
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
TopSee Also