ImageEn, unit hyiedefs

TIELineLabelPos


Declaration

TIELineLabelPos = (ielpHide, ielpAtStart, ielpAtEnd, ielpAbove, ielpBelow, ielpAutoAbove, ielpAutoBelow);


Description

Value Description
ielpHide Does not show the text label even if text has been specified
ielpAtStart Shows the text label at the start of the line
ielpAtEnd Shows the text label at the end of the line
ielpAbove Shows the text above the line (without any border or background)
ielpBelow Shows the text below the line (without any border or background)
ielpAutoAbove Always shows the text above the line and automatically flips the text it is upright (i.e. it is above regardless of the rotation)
ielpAutoBelow Always shows the text below the line and automatically flips the text it is upright (i.e. it is below regardless of the rotation)


Examples

// Move the label to the start of the line
TIELineLayer( ImageEnView1.CurrentLayer ).LabelPosition := ielpAtStart;

// Hide labels of all line layers when user clicks a check box
procedure Tfmain.chkShowLabelsClick(Sender: TObject);
var
  I: integer;
begin
  for I := 0 to ImageEnView1.LayersCount - 1 do
    if ImageEnView1.Layers[ I ].Kind = ielkLine then
    begin
      if chkShowLabels.Checked then
        TIELineLayer( ImageEnView1.Layers[ I ]).LabelPosition := ielpAtEnd
      else
        TIELineLayer( ImageEnView1.Layers[ I ]).LabelPosition := ielpHide;
    end;
  ImageEnView1.Update();
end;