Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 256

Previous Page 255   Index   Next Page 257

Function Reference
Page 256 of 750
Remarks:
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.
CreateRadialShading
Syntax:
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 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 cones.
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.
Shadings support any device, ICCBased, and special color spaces like DeviceN or Separation. The
color values of the start and end color must be defined in the current color space. See also
SetColorSpace(), SetExtColorSpace().
This function creates a shading object but it doesn't draw it on the page. The shading can be drawn
with ApplyShading().
Return values:
 

Previous topic: CreateOCMD

Next topic: CreateRadioButton