TIELineLayer.LabelFillGradient
Declaration
property LabelFillGradient: TIEGDIPlusGradient;
Description
The direction of the gradient used for the
text label fill.
If
LabelFillColor is different from
LabelFillColor2 the text box is filled with a gradient.
LabelFillGradient specifies the direction.
To disable the gradient set the
LabelFillColor2 to clNone, or
LabelFillGradient to gpgNone.
Note: The label does not have a fill if
LabelPosition is ielpAbove, ielpBelow, ielpAutoAbove or ielpAutoBelow
Default: gpgVertical
// Set a horizontal gradient fill for the label of a line layer
TIELineLayer(ImageEnView1.CurrentLayer).LabelFillColor := clRed;
TIELineLayer(ImageEnView1.CurrentLayer).LabelFillColor2 := clYellow;
TIELineLayer(ImageEnView1.CurrentLayer).LabelFillGradient := gpgHorizontal;
TIELineLayer(ImageEnView1.CurrentLayer).LabelBorderColor := clBlack;
TIELineLayer(ImageEnView1.CurrentLayer).LabelBorderWidth := 3;
ImageEnView1.Update();
// Which is the same as...
ImageEnView1.CurrentLayer.FillColor := clRed;
ImageEnView1.CurrentLayer.FillColor2 := clYellow;
ImageEnView1.CurrentLayer.FillGradient := gpgHorizontal;
ImageEnView1.CurrentLayer.BorderColor := clBlack;
ImageEnView1.CurrentLayer.BorderWidth := 3;
ImageEnView1.Update();
Compatibility Information
Prior to v10.0.0, Layer Gradients were of type
TIELayerGradient. All gradients are now type
TIEGDIPlusGradient.
Conversions are as follows: grdNone -> gpgNone, grdHorizontal -> gpgHorizontal, grdVertical -> gpgVertical, grdHorzCenter -> gpgHorzCenter, grdVertCenter -> gpgVertCenter, grdDiagonal -> gpgDiagonal, grdDiagonal2 -> gpgDiagonal2, grdDiagCentered -> gpgDiagCenter, grdDiagCentered2 -> gpgDiagCenter2
Note: Items of
TIEGDIPlusGradient do not have the same indexes as
TIELayerGradient.
// cmbGradient contains items: None, Horizontal, Vertical, Horz Center...
// <= v9.3.1
if cmbGradient.ItemIndex = 0 then
lyr.FillGradient := gpgNone
else
lyr.FillGradient := TIELayerGradient( cmbGradient.ItemIndex - 1 );
// v10.0.0
lyr.FillGradient := TIEGDIPlusGradient( cmbGradient.ItemIndex );
See Also
◼TIELayer.FillGradient
◼LabelFillColor
◼LabelFillColor2
◼FillOpacity