ImageEn, unit iexLayers

TIETextLayer.HorzMargin

TIETextLayer.HorzMargin


Declaration

property HorzMargin: Double;


Description

Increase the size of the border shape above and below the text. HorzMargin is a percentage value, so 0.10, sets 10% of the left and right as spacing.

Note: HorzMargin has no effect if the border shape is not visible.

Default: 0


Examples

// Set shape to circular with 10% spacing on all sides (i.e. making ellipse taller and wider)
TIETextLayer( ImageEnView1.CurrentLayer ).BorderShape := iesEllipse;
TIETextLayer( ImageEnView1.CurrentLayer ).HorzMargin := 0.10;
TIETextLayer( ImageEnView1.CurrentLayer ).VertMargin := 0.10;
ImageEnView1.Update();

// Add a "Shape" layer with margins around text
ImageEnView1.LayersAdd( ielkText );
TIETextLayer( ImageEnView1.CurrentLayer ).Text         := 'EXPLOSION!';
TIETextLayer( ImageEnView1.CurrentLayer ).Font.Style   := [fsBold];
TIETextLayer( ImageEnView1.CurrentLayer ).BorderShape  := iesExplosion;
TIETextLayer( ImageEnView1.CurrentLayer ).BorderColor  := clBlack;
TIETextLayer( ImageEnView1.CurrentLayer ).BorderWidth  := 1;
TIETextLayer( ImageEnView1.CurrentLayer ).FillColor    := clRed;
TIETextLayer( ImageEnView1.CurrentLayer ).FillColor2   := clYellow;
TIETextLayer( ImageEnView1.CurrentLayer ).FillGradient := gpgVertCenter;
TIETextLayer( ImageEnView1.CurrentLayer ).Alignment    := iejCenter;
TIETextLayer( ImageEnView1.CurrentLayer ).Layout       := ielCenter;
TIETextLayer( ImageEnView1.CurrentLayer ).HorzMargin   := 0.15;
TIETextLayer( ImageEnView1.CurrentLayer ).VertMargin   := 0.25;
TIETextLayer( ImageEnView1.CurrentLayer ).SizeToText();
ImageEnView1.Update();




See Also

VertMargin
TextOffsetX
AutoSize