BkgGradientMiddleColor

<< Click to Display Table of Contents >>

Navigation:  Drawing Functions >

BkgGradientMiddleColor

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.

property Color VPE.BkgGradientMiddleColor

read / write; runtime only; also supported by TVPEObject

Possible Values:

any of the "COLOR_xyz" constants described in Programmer's Manual

or ActiveX / VCL: any RGB value

or .NET: any member of the .NET Color structure

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:

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.