|
#include <Shading.h>
Public Types | |
| enum | Type { e_function_shading, e_axial_shading, e_radial_shading, e_free_gouraud_shading, e_lattice_gouraud_shading, e_coons_shading, e_tensor_shading, e_null } |
Public Member Functions | |
| Shading (SDF::Obj shading_dict=0) | |
| Create a Shading from the given SDF/Cos object listed under /Shading entry in the page Resource dictionary. | |
| 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 () |
| An color point represented in base color space specifying a single background color value. | |
| bool | GetAntialias () |
| |
| double | GetParamStart () |
| |
| double | GetParamEnd () |
| |
| bool | IsExtendStart () |
| |
| bool | IsExtendEnd () |
| |
| void | GetColor (double t, ColorPt &out_color) |
| |
| void | GetCoords (double &out_x0, double &out_y0, double &out_x1, double &out_y1) |
| |
| void | GetCoords (double &out_x0, double &out_y0, double &out_r0, double &out_x1, double &out_y1, double &out_r1) |
| |
| void | GetDomain (double &out_xmin, double &out_xmax, double &out_ymin, double &out_ymax) |
| |
| Common::Matrix2D | GetMatrix () |
| |
| void | GetColor (double t1, double t2, ColorPt &out_color) |
| |
Static Public Member Functions | |
| static Type | GetType (SDF::Obj shading_dict) |
| |
A Coons patch generally has two independent aspects:
| pdftron::PDF::Shading::Shading | ( | SDF::Obj | shading_dict = 0 |
) |
| pdftron::PDF::Shading::Shading | ( | const Shading & | s | ) |
| pdftron::PDF::Shading::~Shading | ( | ) |
| cs |
| Shading::Type pdftron::PDF::Shading::GetType | ( | ) | const |
| SDF::Obj pdftron::PDF::Shading::GetSDFObj | ( | ) |
| ColorSpace pdftron::PDF::Shading::GetBaseColorSpace | ( | ) |
This may be any device, CIE-based, or special color space except a Pattern space.
| bool pdftron::PDF::Shading::HasBBox | ( | ) |
| Rect pdftron::PDF::Shading::GetBBox | ( | ) |
The coordinates are interpreted in the shading’s target coordinate space. If present, this bounding box is 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.
| bool pdftron::PDF::Shading::HasBackground | ( | ) |
| ColorPt pdftron::PDF::Shading::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.
Use HasBackground() method to determine whether the shading has a background color.
| bool pdftron::PDF::Shading::GetAntialias | ( | ) |
See Table 4.25
| double pdftron::PDF::Shading::GetParamStart | ( | ) |
The variable is considered to vary linearly between GetParamStart() and GetParamEnd() as the color gradient varies between the starting and ending points of the axis for Axial shading or circles for Radial shading. The variable t becomes the input argument to the color function(s).
for shadings other than Axial or Radial this method throws an exception.
| double pdftron::PDF::Shading::GetParamEnd | ( | ) |
The variable is considered to vary linearly between GetParamStart() and GetParamEnd() as the color gradient varies between the starting and ending points of the axis for Axial shading or circles for Radial shading. The variable t becomes the input argument to the color function(s).
for shadings other than Axial or Radial this method throws an exception.
| bool pdftron::PDF::Shading::IsExtendStart | ( | ) |
| bool pdftron::PDF::Shading::IsExtendEnd | ( | ) |
| void pdftron::PDF::Shading::GetColor | ( | double | t, | |
| ColorPt & | out_color | |||
| ) |
| void pdftron::PDF::Shading::GetCoords | ( | double & | out_x0, | |
| double & | out_y0, | |||
| double & | out_x1, | |||
| double & | out_y1 | |||
| ) |
| void pdftron::PDF::Shading::GetCoords | ( | double & | out_x0, | |
| double & | out_y0, | |||
| double & | out_r0, | |||
| double & | out_x1, | |||
| double & | out_y1, | |||
| double & | out_r1 | |||
| ) |
The radii r0 and r1 must both be greater than or equal to 0. If one radius is 0, the corresponding circle is treated as a point; if both are 0, nothing is painted.
| void pdftron::PDF::Shading::GetDomain | ( | double & | out_xmin, | |
| double & | out_xmax, | |||
| double & | out_ymin, | |||
| double & | out_ymax | |||
| ) |
If the function does not contain /Domain entry the function returns: [0 1 0 1].
| Common::Matrix2D pdftron::PDF::Shading::GetMatrix | ( | ) |
| void pdftron::PDF::Shading::GetColor | ( | double | t1, | |
| double | t2, | |||
| ColorPt & | out_color | |||
| ) |