ImageEn, unit iexLayers

TIEAngleLayer

TIEAngleLayer


Description


TImageEnView supports multiple layers, allowing the creation of a single image from multiple source images (which can be resized, rotated, moved, etc).
TIEAngleLayer is a descendent of TIELayer that displays an angle formed from three points, and a label showing the angle value.



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

Item Description
mlClickCreateAngleLayers Click three points to create an angle layer
mlEditLayerPoints Click and drag points to move them. Click on the polyline to add a point, Alt key to convert a point to a curve, Ctrl+click or delete key to remove a point
mlEditLayerPoints Click and drag points to move them
mlCreateAngleLayers Drag the area of an angle layer. Include mlRotateLayers to rotate the sweep angle (Hold Ctrl to adjust start angle instead)


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


Methods and Properties


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


Style
  AngleMode
  AntiAlias
  AlphaEdgeFeathering
  Cropped
  LabelDecimalPlaces
  LabelFont
  LabelText
  LineColor
  LineWidth
  Opacity
  Operation
  Rotate
  SoftShadow


Size and Position
  AspectRatioLocked
  ClientAreaBox
  ConvXBmp2Scr
  ConvXScr2Bmp
  ConvYBmp2Scr
  ConvYScr2Bmp
  EndAngle
  GetPointEx
  Height
  InvertAngle
  Points
  PosX
  PosY
  PreferredAspectRatio
  RestoreAspectRatio
  SetPoints
  StartAngle
  SweepAngle
  Width

 Unique to TIEAngleLayer


Examples


// All of the following produce an angle similar to this



xx := 100;
yy := 100;


// SET BY POINTS

ImageEnView1.LayersAdd( ielkAngle );
with TIEAngleLayer( ImageEnView1.CurrentLayer ) do
begin
  LineWidth := 2;
  LineColor := clDkGray;
  LabelFont.Color := clBlue;
  LabelFont.Style := [fsBold];

  // Set by points on bitmap
  SetPoints( 0, xx + 180, yy + 130, iepbBitmap );
  SetPoints( 1, xx + 0 , yy + 130, iepbBitmap );
  SetPoints( 2, xx + 130, yy + 0 , iepbBitmap );

  // Which is the same as:
  // SetPoints( [ Point( xx + 130, yy + 0 ), Point( xx + 0, yy + 130 ), Point( xx + 130, yy + 0 ), iepbBitmap );
end;
ImageEnView1.Update();


// SET BY SIZE

ImageEnView1.LayersAdd( ielkAngle );
with TIEAngleLayer( ImageEnView1.CurrentLayer ) do
begin
  PosX := xx;
  PosY := yy;

  // Note: Size is larger than above because we must take text and arc into account
  Width := 209;
  Height := 159;
  LineWidth := 2;
  LineColor := clDkGray;
  LabelFont.Color := clBlue;
  LabelFont.Style := [fsBold];

  // Set as a percentage (actually range from 0 - 1000) of the width
  SetPoints( 0, 1000, 1000 );
  SetPoints( 1, 0 , 1000 );
  SetPoints( 2, 720 , 0 );

  // Which is the same as:
  // SetPoints( [ Point( 1000, 1000 ), Point( 0, 1000 ), Point( 720 , 0 ) ], iepbBitmap );
end;
ImageEnView1.Update();


// SET BY ANGLE

ImageEnView1.LayersAdd( ielkAngle );
with TIEAngleLayer( ImageEnView1.CurrentLayer ) do
begin
  PosX := xx;
  PosY := yy;

  // Note: Size is larger than above because we must take text and arc into account
  // Even then, result will be different because we do not set the line lengths
  Width := 209;
  Height := 159;
  LineWidth := 2;
  LineColor := clDkGray;
  LabelFont.Color := clBlue;
  LabelFont.Style := [fsBold];

  // Set by angle
  StartAngle := 0;
  SweepAngle := 45;
end;
ImageEnView1.Update();


See Also


- LayersAdd
- LayersInsert
- TIELayerKind