ImageEn, unit iexLayers

TIETextLayer.TextOffsetY

TIETextLayer.TextOffsetY


Declaration

property TextOffsetY: Double;


Description

Shifts the drawing of text up or down. TextOffsetY is a percentage value with positive and negative values, so -0.10, moves the text up 10% of the layer height. 0.50 will shift halfway down.

Note: There is no checking to ensure text is validly drawn using TextOffsetY. I.e. Extreme values may cause the text to not be visible.

Default: 0


Examples

// Draw text bubble and position text within it
TIETextLayer( ImageEnView1.CurrentLayer ).BorderShape := iesSpeechBubbleLeftOutShort;
TIETextLayer( ImageEnView1.CurrentLayer ).TextOffsetY := -0.18;
ImageEnView1.Update();

// Add a "Shape" layer with vertically offset text
ImageEnView1.LayersAdd( ielkText, 200, 200, 230, 200 );
ImageEnView1.CurrentLayer.AspectRatioLocked            := True;
TIETextLayer( ImageEnView1.CurrentLayer ).BorderShape  := iesHeart;
TIETextLayer( ImageEnView1.CurrentLayer ).BorderWidth  := 0;
TIETextLayer( ImageEnView1.CurrentLayer ).BorderColor  := clNone;
TIETextLayer( ImageEnView1.CurrentLayer ).FillColor    := $004646FF;
TIETextLayer( ImageEnView1.CurrentLayer ).Font.Style   := [fsBold];
TIETextLayer( ImageEnView1.CurrentLayer ).Alignment    := iejCenter;
TIETextLayer( ImageEnView1.CurrentLayer ).Layout       := ielCenter;
TIETextLayer( ImageEnView1.CurrentLayer ).WordWrap     := False;
TIETextLayer( ImageEnView1.CurrentLayer ).Text         := 'I Heart Delphi';
TIETextLayer( ImageEnView1.CurrentLayer ).Font.Size    := 22;
TIETextLayer( ImageEnView1.CurrentLayer ).TextOverflow := ieoShrink;
TIETextLayer( ImageEnView1.CurrentLayer ).TextOffsetY  := -0.15;
ImageEnView1.Update();




See Also

VertMargin
TextOffsetX
AutoSize