DynaPDF Manual - Page 239

Previous Page 238   Index   Next Page 240

Function Reference
Page 239 of 839
SI32 pdfCreateAxialShading(
const PPDF* IPDF, // Instance pointer
double sX,
// X-Coordinate of the start point
double sY,
// Y-Coordinate of the start point
double eX,
// X-Coordinate of the end point
double eY,
// Y-Coordinate of the end point
double SCenter,
// Shading center
UI32 SColor,
// Start color
UI32 EColor,
// End color
LBOOL Extend1,
// Extend the shading beyond the start point
LBOOL Extend2)
// Extend the shading beyond the end point
Axial shadings define a color blend or gradient that varies along a linear axis between two
endpoints and extends indefinitely perpendicular to that axis. The shading may optionally be
extended beyond either or both endpoints by continuing the boundary colors indefinitely.
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 starting and ending point of the shading. Smaller values
shift the shading center in direction to the start point, greater values in the direction to the end
Axial 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 becomes 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 the color spaces DeviceGray, DeviceRGB, and DeviceCMYK. The color values of
the start and end color must be defined in the current color space. See also SetColorSpace().
Shadings are invisible as long they are not drawn by using the function ApplyShading().
ApplyShading() requires a shading handle that was returned by this function.
See the function ApplyShading() for an example application.
Return values:
If the function succeeds the return value is the handle of the shading, a value greater or equal zero.
If the function fails the return value is a negative error code.

Previous topic: CreateArticleThread

Next topic: CreateBarcodeField