DynaPDF Manual - Page 279

Previous Page 278   Index   Next Page 280

Function Reference
Page 279 of 818
The parameter Visibility specifies when the associated objects should become visible. The parameter
OCGs must be an array of valid OCG handles. A viewer application inspects the array of OCGs and
the visibility parameter to determine whether the associated content should be visible or invisible.
Unused OCMDs will not be written to the PDF file.
Return values:
If the function succeeds the return value is the OCMD handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
SI32 pdfCreateRadialShading(
const PPDF* IPDF, // Instance pointer
double sX,
// X-Coordinate of the inner circle
double sY,
// Y-Coordinate of the inner circle
double R1,
// Radius of the inner circle
double eX,
// X-Coordinate of the outer circle
double eY,
// Y-Coordinate of the outer circle
double R2,
// Radius of the outer circle
double SCenter,
// Shading center
UI32 SColor,
// Start color
UI32 EColor,
// End color
LBOOL Extend1,
// Extend the inner circle
LBOOL Extend2)
// Extend the outer circle
Radial shadings define a color blend or gradient that varies between two circles. The shading may
optionally be extended beyond the starting or ending circles by continuing the boundary colors
indefinitely. Shadings of this type are commonly used to depict three-dimensional spheres and
The shading center defines the point from where the first color will blend into the other. A value of 1
determines the exact center between the start and end point of the shading. Smaller values shift the
shading center in direction to the start circle, greater values to the end circle.
Radial shadings can be drawn into a clipping path to restrict painting into this path. If the shading is
drawn outside of a clipping path it is applied to the entire page. Not that extended shadings are
opaque, objects behind the shading become invisible if they are overprinted by the shading.
Shadings are drawn by using the current coordinate system. It is recommended to understand that
shadings have its own dimension like a normal shape. The parameters Extend1 and Extend2 extend
the shading beyond its dimension. If the shading is extended it must normally be drawn into a
clipping path to avoid overprinting of other objects.

Previous topic: CreateOCMD

Next topic: CreateRadioButton

Start Chat