ImageEn, unit iexLayers



TIELayerKind = (ielkImage, ielkShape, ielkLine, ielkPolyline, ielkText, ielkAngle);


Returns the type of a TIELayer.
Kind Class Description
ielkImage TIEImageLayer Layer that contains an image
ielkShape TIEShapeLayer Layer that displays standard shapes (rectangles, ellipses, stars, etc)
ielkLine TIELineLayer Layer that displays a single line, optionally including a text label and start and ending arrows
ielkPolyline TIEPolylineLayer Layer that displays a polyline or polygon of multiple points
ielkAngle TIEAngleLayer Layer that displays an angle
ielkText TIETextLayer Layer that displays text

Example 1

if ImageEnView1.CurrentLayer.Kind = ielkImage then
  TIEImageLayer( ImageEnView1.CurrentLayer ).ResampleFilter := rfLanczos3;

// Which is the same as...
if ImageEnView1.CurrentLayer is TIEImageLayer then
  TIEImageLayer( ImageEnView1.CurrentLayer ).ResampleFilter := rfLanczos3;

Example 2

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