VpeSetBkgGradientMiddleColor

<< Click to Display Table of Contents >>

Navigation:  Drawing Functions >

VpeSetBkgGradientMiddleColor

Previous pageReturn to chapter overviewNext page

[Not supported by the Community Edition]

Specifies the gradient middle color for tri-color gradients. To make the gradient painted, the Background Mode must be set to VBKG_GRD_LINE and the Tri Color Mode must be activated.

void VpeSetBkgGradientMiddleColor(

VpeHandle hDoc,

COLORREF color_middle

)

VpeHandle hDoc

Document Handle or VPE Object Handle

COLORREF color_middle

one of the predefined "COLOR_xyz" constants described in Programmer's Manual or any RGB value

Default:

COLOR_WHITE (but the Transparent Background Mode is activated and Tri Color Mode is deactivated!)

Remarks:

Gradients do only work for rectangular objects like Boxes, Text, Ellipses, etc. Gradients are not drawn in Pies and Polygons. If a gradient mode is selected, hatching for the same object is not possible.

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.