VpeSetBkgGradientMiddleColorPosition

<< Click to Display Table of Contents >>

Navigation:  Drawing Functions >

VpeSetBkgGradientMiddleColorPosition

Previous pageReturn to chapter overviewNext page

[Not supported by the Community Edition]

Specifies the position of the middle color for tri-color gradients.

void VpeSetBkgGradientMiddleColorPosition(

VpeHandle hDoc,

int position

)

VpeHandle hDoc

Document Handle or VPE Object Handle

int position

the position in percent of the object’s height (or width, if the gradient is rotated)

Default:

50 %

Remarks:

Tri-color gradients can only be used, when the Background Mode is set to VBKG_GRD_LINE.

Example:

VpeSetBkgGradientTriColor(hDoc, TRUE);

VpeSetBkgMode(hDoc, VBKG_GRD_LINE);

VpeSetBkgGradientMiddleColorPosition(hDoc, 35);

VpeSetBkgGradientStartColor(hDoc, COLOR_LTGRAY);

VpeSetBkgGradientMiddleColor(hDoc, COLOR_WHITE);

VpeSetBkgGradientEndColor(hDoc, COLOR_DKGRAY);

VpePrint(hDoc, 1, 1, "Hello World!")

Will draw the text "Hello World!" with a gradient running from light grey over white (at a position which is 35% of the object’s height) to dark grey, which will give it a silver cylindrical appearance.