BkgGradientMiddleColorPosition

<< Click to Display Table of Contents >>

Navigation:  Drawing Functions >

BkgGradientMiddleColorPosition

Previous pageReturn to chapter overviewNext page

[Not supported by the Community Edition]

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

property int VPE.BkgGradientMiddleColorPosition

read / write; runtime only; also supported by TVPEObject

Possible Values:

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:

ActiveX / VCL:

Doc.BkgGradientTriColor = True

Doc.BkgMode = VBKG_GRD_LINE

Doc.BkgGradientMiddleColorPosition = 35

Doc.BkgGradientStartColor = COLOR_LTGRAY

Doc.BkgGradientMiddleColor = COLOR_WHITE

Doc.BkgGradientEndColor = COLOR_DKGRAY

Doc.Print(1, 1, "Hello World!")

 

.NET:

Doc.BkgGradientTriColor = True

Doc.BkgMode = BkgMode.GradientLine

Doc.BkgGradientMiddleColorPosition = 35

Doc.BkgGradientStartColor = Color.LightGray

Doc.BkgGradientMiddleColor = Color.White

Doc.BkgGradientEndColor = Color.DarkGray

Doc.Print(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.