DynaPDF Manual - Page 291

Previous Page 290   Index   Next Page 292

Function Reference
Page 291 of 839
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:
If the function succeeds the return value is the shading handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
CreateRadioButton
Syntax:
SI32 pdfCreateRadioButton(
const PPDF* IPDF,
// Instance pointer
const char* Name,
// Name of the radio button
const char* ExpValue, // Export value of the first check box
SI32 Checked,
// If true, the check box appears checked
SI32 Parent,
// Parent group field if any or -1
double PosX,
// X-Coordinate of the first check box
double PosY,
// Y-Coordinate of the first check box
double Width,
// Width of the first check box
double Height)
// Height of the first check box
A radio button field is a set of related toggle controls (check boxes), at most one of which may be on
at any given time; selecting any one of the button automatically deselects all others.
If the coordinate system is bottom-up the point PosX, PosY defines the lower left corner of the first
check box that is automatically created by this function. If the coordinate system is top-down it
defines the upper left corner.
Like all form fields, the width and height is measured incl. the line width of the border. The size of
normal vector graphics is measured without the line width; this must be taken into account when
calculating the width or height of a form field. The line width of the border is derived from the
current graphics state (see SetLineWidth()), it should be either 0, 1, 2, or 3 units (no border, thin,
medium, or thick). The border style can be changed with the functions SetBorderStyle() or
SetFieldBorderStyle().
This field type supports two additional flags: ffNoToggleToOff and ffRadioIsUnion. The flag
ffNoToggleToOff has no more any effect in Adobes Acrobat or Reader. The radio button behaves
always as if the flag ffNoToggleToOff is set.
If the flag ffRadioIsUnion is set, and if two or more check boxes contain the same export value, then
these check boxes will be selected in unison.
 

Previous topic: CreateRadialShading

Next topic: CreateRasterizer (Rendering Engine)