|
| Shading (SDF::Obj shading_dict=0) |
|
| Shading (const Shading &s) |
|
Shading & | operator= (const Shading &s) |
|
| ~Shading () |
|
Shading::Type | GetType () const |
|
SDF::Obj | GetSDFObj () |
|
ColorSpace | GetBaseColorSpace () |
|
bool | HasBBox () |
|
Rect | GetBBox () |
|
bool | HasBackground () |
|
ColorPt | GetBackground () |
|
bool | GetAntialias () |
|
double | GetParamStart () |
|
double | GetParamEnd () |
|
bool | IsExtendStart () |
|
bool | IsExtendEnd () |
|
ColorPt | GetColor (double t) |
|
void | GetColor (double t, ColorPt &out_color) |
|
std::vector< double > | GetCoordsAxial () |
|
void | GetCoords (double &out_x0, double &out_y0, double &out_x1, double &out_y1) |
|
std::vector< double > | GetCoordsRadial () |
|
void | GetCoords (double &out_x0, double &out_y0, double &out_r0, double &out_x1, double &out_y1, double &out_r1) |
|
std::vector< double > | GetDomain () |
|
void | GetDomain (double &out_xmin, double &out_xmax, double &out_ymin, double &out_ymax) |
|
Common::Matrix2D | GetMatrix () |
|
ColorPt | GetColor (double t1, double t2) |
|
void | GetColor (double t1, double t2, ColorPt &out_color) |
|
void | Destroy () |
|
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 Bezier 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.
Definition at line 60 of file Shading.h.