ImageEn, unit iexLayers

TIELineLayer

TIELineLayer


Description


TImageEnView supports multiple layers, allowing the creation of a single image from multiple source images (which can be resized, rotated, moved, etc).
TIELineLayer is a descendent of TIELayer that displays a single line. It can optionally display a text label and starting and ending arrows.



You can create line layers with code using LayersAdd or by user action by setting MouseInteractLayers:

Item Description
mlClickCreateLineLayers Click start and end points to draw out a line layer
mlEditLayerPoints Click and drag points to move them
mlCreateLineLayers Drag the area of a line layer


Review the Layer Documentation for a full description of layer support.


Methods and Properties


General
  ActivateEditor
  Assign
  ConvertToImageLayer
  ConvertToPolylineLayer
  CopyToBitmap
  DrawingInfo
  DrawOuter
  GetProperties
  Guid
  GroupIndex
  IsMask
  Kind
  LayerIndex
  Locked
  MaskInverted
  Modified
  Name
  ReadOnly
  Selectable
  Selected
  SetProperties
  SetTextProperties
  Swap
  SupportsFeature
  Tag
  UserData
  UserDataLen
  Visible
  VisibleBox


Style
  AntiAlias
  AlphaEdgeFeathering
  Cropped
  EndShape
  FillColor
  FillOpacity
  IsRuler
  LabelAlignment
  LabelBorderColor
  LabelBorderWidth
  LabelFillColor
  LabelFillColor2
  LabelFillGradient
  LabelFont
  LabelPosition
  LabelShape
  LabelText
  LineColor
  LineLength
  LinePoint1
  LinePoint2
  LineWidth
  Opacity
  Operation
  Rotate
  RulerUnits
  ShapeSize
  SoftShadow
  StartShape
  TextOverflow


Size and Position
  AspectRatioLocked
  ClientAreaBox
  ConvXBmp2Scr
  ConvXScr2Bmp
  ConvYBmp2Scr
  ConvYScr2Bmp
  Height
  LabelHorzMargin
  LabelVertMargin
  PosX
  PosY
  PreferredAspectRatio
  RestoreAspectRatio
  RulerValue
  SetLinePointsEx
  SizeToFit
  Width

 Unique to TIELineLayer


Examples


// Add a layer with yellow filled arrows and circle ends
ImageEnView1.LayersAdd( ielkLine );
TIELineLayer( ImageEnView1.CurrentLayer ).StartShape := ieesArrow;
TIELineLayer( ImageEnView1.CurrentLayer ).EndShape := ieesCircle;
TIELineLayer( ImageEnView1.CurrentLayer ).FillColor := clYellow;
TIELineLayer( ImageEnView1.CurrentLayer ).ShapeSize := 25;
ImageEnView1.Update();



// Hide labels of all line layers when user clicks a check box
procedure Tfmain.chkShowLabelsClick(Sender: TObject);
var
  I: integer;
begin
  ImageEnView1.LockUpdate();
  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.UnlockUpdate();
end;

// Allow users to create and edit line layers
ImageEnView1.MouseInteractLayers := [ mlClickCreateLineLayers, mlEditLayerPoints ];


See Also


- LayersAdd
- LayersInsert
- TIELayerKind
- MouseInteractLayers