ImageEn, unit ievect

TImageEnVect vs TIELayers


ImageEn offers two methods to add image, shape, line and text objects to an image that be moved, sized and rotated to generate a single merged image. There are the older TImageEnVect Objects and since v7.0.0, the new TImageEnView Layers. Moving forward, our efforts will be going with the TIELayers, so if you have older code using TImageEnVect, you may want to transition it. This guide is to help you through the process.

TIELayers offer a number of improvements over the older TImageEnVect Objects:
- Object oriented design: Each layer is a programming object (of type TIELayer) and a descendent class, e.g. TIEImageLayer for images layers, TIETextLayer for text ones, etc.
- Improved quality and styling: All layers support conistent methods for borders, properties, gradients, etc, and use GDI+ for quality and performance
- All layers types can be freely rotated in code or by user interaction
- 100 built-in vector shapes
- Layers of an image can be previewed in a TImageEnLayerMView
- Vector output to SVF and PDF files
- Loading and saving from Photoshop PSD
- Layer masking



At present, TIELayers do not include the following features available in TImageEnVect:
- No curved text


Of course, because TIELayers use a much newer design, there will be a number of changes needed to your code if you are transitioning from TImageEnVect. The main difference is that TImageEnVect used properties to modify objects, whereas with TImageEnView, all layers are an object, e.g. TIEImageLayer or TIETextLayer (of an ancestor class TIELayer).


Demos

Some code comparison is given in the demo:

Demos\VectorEditor\ImageEnVect_vs_ImageEnView\VectvsView.dpr



Examples

Compare this code:

// TImageEnVect: Set the width of the object just inserted
idx := ImageEnVect1.GetObjFromID( IEV_PREVIOUS_INSERTED_OBJECT );
ImageEnVect1.ObjWidth[ idx ] := 100;

// TIELayers: Set the width of the layer just inserted
ImageEnView1.CurrentLayer.Width := 100;


// TImageEnVect: Set the pen/border of the first object after the background
idx := ImageEnVect1.GetObjFromIndex( 0 );
ImageEnVect1.ObjPenColor[ idx ] := clGreen;

// TIELayers: Set the pen/border of the first layer after the background
// Note: The background is an image layer (layer 0), so the first layer after that would be 1
ImageEnView1.Layers[1].BorderColor := clGreen;


// TImageEnVect: Set the text of the first object (which is of type iekTEXT)
idx := ImageEnVect1.GetObjFromIndex( 0 );
ImageEnVect1.ObjText[ idx ] := 'ABC';

// TIELayers: Set the pen/border of the first layer after the background
// Check type for safety
if ImageEnView1.Layers[1] is TIETextLayer then
  TIETextLayer( ImageEnView1.Layers[1]).Text := 'ABC';


// TImageEnVect: Set border color to Green for all selected objects
for i := 0 to ImageEnVect1.SelObjectsCount - 1 do
  ImageEnVect1.ObjPenColor[ ImageEnVect1.SelObjects[i] ] := clGreen;

// TIELayers: Set border color to Green for all selected layers
for i := 0 to ImageEnView1.LayersCount - 1 do
  if ImageEnView1.Layers[i].Selected then
    ImageEnView1.Layers[i].BorderColor := clGreen;
ImageEnView1.Update();

// Or you can just use ImageEnView1.LayersSetProperties( LYR_SELECTED_LAYERS, IELP_BorderColor, clGreen );


// TImageEnVect: Add a row of ten boxes
ImageEnVect1.RemoveAllObjects();
for i := 1 to 10 do
begin
  ImageEnVect1.ObjPenWidth[IEV_NEXT_INSERTED_OBJECT]] := 2;
  ImageEnVect1.ObjBrushColor[IEV_NEXT_INSERTED_OBJECT] := clYellow;
  x := i * 100;
  y := 100;
  ImageEnVect1.AddNewObject( iekBOX, Rect( x, y, x + Box_Width, y + Box_Height), clRed );
end;

// TIELayer: Add a row of ten boxes
ImageEnView1.LayersClear( False );
for i := 1 to 10 do
begin
  x := i * 100;
  y := 100;
  ImageEnView1.LayersAdd( iesRectangle, Rect( x, y, x + Box_Width, y + Box_Height), clRed );
  // Newly added layer becomes "CurrentLayer"
  ImageEnView1.CurrentLayer.BorderWidth = 2;
  ImageEnView1.CurrentLayer.FillColor = clYellow;
end;
ImageEnView1.Update();


// TImageEnVect: Add a "Highlight" box
ImageEnVect1.ObjKind[-1] := iekBOX;
ImageEnVect1.ObjLeft[-1] := x;
ImageEnVect1.ObjTop[-1] := y;
ImageEnVect1.ObjWidth[-1] := width;
ImageEnVect1.ObjHeight[-1] := height;
ImageEnVect1.ObjBoxHighlight[-1] := true;
ImageEnVect1.ObjBrushColor[-1] := clYellow;
ImageEnVect1.AddNewObject();

// TIELayers: Add a "Highlight" box
ImageEnView1.LayersAdd( iesRectangle );
ImageEnView1.CurrentLayer.PosX := x;
ImageEnView1.CurrentLayer.PosY := y;
ImageEnView1.CurrentLayer.Width := width;
ImageEnView1.CurrentLayer.Height := height;
ImageEnView1.CurrentLayer.BorderColor := clNone;
ImageEnView1.CurrentLayer.FillColor := clYellow;
ImageEnView1.CurrentLayer.Opacity := 0.5;
ImageEnView1.Update();


// Add a red, borderless text box
hobj := ImageEnVect1.AddNewObject(iekMEMO, Rect(x, y, x+width, y+height), clWhite);
ImageEnVect1.ObjText[hobj] := 'This is a test';
ImageEnVect1.ObjFontName[hobj] := 'Tahoma';
ImageEnVect1.ObjFontHeight[hobj] := 12;
ImageEnVect1.ObjPenColor[hobj] := clBlack;
ImageEnVect1.ObjBrushStyle[hobj] := bsSolid;
ImageEnVect1.ObjBrushColor[hobj] := clRed;
ImageEnVect1.ObjMemoCharsBrushStyle[hobj] := bsSolid;

// Add a red, borderless text box
ImageEnView1.LayersAdd( ielkText, Rect(x, y, x+width, y+height));
With TIETextLayer( ImageEnView1.CurrentLayer ) do
begin
  Text := 'This is a test';
  Font.Name := 'Tahoma';
  Font.Height := 12;
  Font.Color := clBlack;
  BorderColor := clNone;
  FillColor := clRed;
end;
ImageEnView1.Update();



// Add a line object to a TImageEnVect from x1,y1 to x2,y2
with ImageEnVect1 do
begin
  AddNewObject; // first create the object, then set its properties
  ObjKind[IEV_PREVIOUS_INSERTED_OBJECT] := iekLINE;
  ObjLeft[IEV_PREVIOUS_INSERTED_OBJECT] := x1;
  ObjTop[IEV_PREVIOUS_INSERTED_OBJECT] := x2;
  ObjWidth[IEV_PREVIOUS_INSERTED_OBJECT] := abs( x2 - x1);
  ObjHeight[IEV_PREVIOUS_INSERTED_OBJECT] := abs( y2 - y1);
  ObjPenColor[IEV_PREVIOUS_INSERTED_OBJECT] := clRed;
  ObjPenWidth[IEV_PREVIOUS_INSERTED_OBJECT] := 3;
end;

// Add a line layer to a TImageEnView from x1,y1 to x2,y2
ImageEnView1.LayersAdd( ielkLine );
with TIELineLayer( ImageEnView1.CurrentLayer ) do
begin
  LinePoint1 := Point( x1, y1 );
  LinePoint2 := Point( x2, y2 );
  LineColor := clRed;
  LineWidth := 3;
end;
ImageEnView1.Update();


// Add an arrow to the current TImageEnVect line
ImageEnVect1.ObjBeginShape[IEV_PREVIOUS_INSERTED_OBJECT] := iesOUTARROW;
ImageEnVect1.ObjBrushStyle[IEV_PREVIOUS_INSERTED_OBJECT] := bsSolid;
ImageEnVect1.ObjBrushColor[IEV_PREVIOUS_INSERTED_OBJECT] := clWhite;

// Add an arrow to the current TImageEnView line layer
if ImageEnView1.CurrentLayer is TIELineLayer then
  TIELineLayer( ImageEnView1.CurrentLayer ).StartShape := ieesArrow;


// Three ways to mark an area of the image with a red box...

myRect := Rect( x, y, x + width, y + height );

// Draw onto bitmap
with ImageEnView1.IEBitmap.Canvas do
begin
  Pen.Color := clRed;
  Pen.Width := 4;
  Brush.Style := bsClear;
  Rectangle( myRect );
end;
ImageEnView1.Update();

// Use rectangle shape layer
ImageEnView1.LayersAdd( iesRectangle, myRect, clRed, 4 );

// Use TImageEnVect Box Object
ImageEnVect1.ObjPenWidth[-1] := 4;
ImageEnVect1.AddNewObject(iekBOX, myRect, clRed);


Transferring Object Data

TImageEnView can load IEV or ALL vector files using LayersImport:

// Import from an IEV file
ImageEnView1.LayersImport( 'C:\Vect.iev' );

// Import from an IEV stream
ImageEnView1.LayersImport( '', myStream );

The objects will be converted to compatible layer types. You can also copy objects from a TImageEnVect directly into a TImageEnView (converting them into layers) using CopyAllObjectsTo:

// Copy background image
ImageEnView1.IEBitmap.Assign( ImageEnVect1.IEBitmap );

// Add objects as layers
ImageEnVect1.CopyAllObjectsTo( ImageEnView1 );



Transitioning your Code

As advised earlier, because TIELayers use a newer object oriented design, there will be a number of changes needed to your code if you are transitioning from TImageEnVect. The following tables outline the equivalent TIELayer code for all properties, methods and events of TImageEnVect, but please let us know on our forum if you are transitioning, and we will help you through the process.


Objects Types

TImageEnVect TImageEnView Equivalent More Information
iekLINE TIELineLayer TIELineLayer
iekBOX TIEShapeLayer with Shape set to iesRectangle TIEShapeLayer
iekELLIPSE TIEShapeLayer with Shape set to iesEllipse TIEShapeLayer
iekARC TIELineLayer with Curve set, or TIEPolylineLayer with Arc overload of TIEPolylineLayer.SetPoints TIELineLayer, TIEPolylineLayer
iekBITMAP TIEImageLayer TIEImageLayer
iekTEXT TIETextLayer with WordWrap set to False TIETextLayer
iekRULER TIELineLayer with RulerMode set to iermLabel TIELineLayer
iekPOLYLINE TIEPolylineLayer TIEPolylineLayer
iekANGLE TIEAngleLayer TIEAngleLayer
iekMEMO TIETextLayer. No rich-text formatting support TIETextLayer
iekLINELABEL TIELineLayer with LabelPosition (e.g. ielpAtStart) and LabelText set TIELineLayer


Display

TImageEnVect TImageEnView Equivalent More Information
AllObjectsHidden No equivalent  
BitmapResampleFilter TIEImageLayer( ImageEnView1.CurrentLayer ).ResampleFilter := rfFastLinear; TIEImageLayer.ResampleFilter
ObjAntialias ImageEnView1.CurrentLayer.AntiAlias := False; TIELayer.AntiAlias
ObjectsExtents r := ImageEnView1.LayersRect; TImageEnView.LayersRect
ObjEnableFastDrawing ImageEnView1.LayersFastDrawing TImageEnView.LayersFastDrawing
ObjGraphicRender Not required, GDI+ is always used for speed and quality  
ZoomObjectsWidth No equivalent, Zoom always affects layers  


User Interaction

TImageEnVect TImageEnView Equivalent More Information
MouseInteractVt See equivalent mouse interact types below... TImageEnView.MouseInteractGeneral
miArea ImageEnView1.MouseInteractLayers := [ mlCreateTextLayers ]; and set ImageEnView1.CurrentLayer.RulerMode := iermLabel; in TImageEnView.OnNewLayer TImageEnView.MouseInteractGeneral
miLineLen No equivalent  
miPutLine ImageEnView1.MouseInteractLayers := [ mlClickCreateLineLayers ]; TImageEnView.MouseInteractLayers
miPutBox ImageEnView1.MouseInteractLayers := [ mlCreateShapeLayers ]; and set IEGlobalSettings().DefaultLayerShape := iesRectangle; (or use TImageEnView.OnNewLayer) TImageEnView.MouseInteractLayers
miPutEllipse ImageEnView1.MouseInteractLayers := [ mlCreateShapeLayers ]; and set IEGlobalSettings().DefaultLayerShape := iesEllipse; (or use TImageEnView.OnNewLayer) TImageEnView.MouseInteractLayers
miPutBitmap ImageEnView1.MouseInteractLayers := [ mlCreateImageLayers ]; TImageEnView.MouseInteractLayers
miPutText ImageEnView1.MouseInteractLayers := [ mlCreateTextLayers ]; and set TIETextLayer( ImageEnView1.CurrentLayer ).WordWrap := False; in TImageEnView.OnNewLayer TImageEnView.MouseInteractLayers
miObjectSelect ImageEnView1.MouseInteractLayer := [ mlMoveLayers, mlResizeLayers ] TImageEnView.MouseInteractLayers
miDragLen ImageEnView1.MouseInteractGeneral := [ miMeasureLength ]; TImageEnView.MouseInteractGeneral
miPutRuler ImageEnView1.MouseInteractLayers := [ mlClickCreateLineLayers ]; and set ImageEnView1.CurrentLayer.RulerMode := iermLabel; in TImageEnView.OnNewLayer TImageEnView.MouseInteractLayers
miPutPolyLine ImageEnView1.MouseInteractLayers := [ mlClickCreatePolylineLayers ]; TImageEnView.MouseInteractLayers
miPutAngle ImageEnView1.MouseInteractLayers := [ mlClickCreateAngleLayers ]; TImageEnView.MouseInteractLayers
miPutMemo ImageEnView1.MouseInteractLayers := [ mlCreateTextLayers ]; TImageEnView.MouseInteractLayers
miPutLineLabel ImageEnView1.MouseInteractLayers := [ mlClickCreateLineLayers ]; TImageEnView.MouseInteractLayers
miEditPolyline ImageEnView1.MouseInteractLayers := [ mlEditLayerPoints ]; TImageEnView.MouseInteractLayers
miUnStampMode ImageEnView1.LayerOptions := ImageEnView1.LayerOptions - [ loStampMode ]; loStampMode
AllowOutOfBitmapMoving ImageEnView1.LayerOptions := ImageEnView1.LayerOptions + [loPreventOutOfBounds]; loPreventOutOfBounds
AllowOutOfBitmapPolylines ImageEnView1.CurrentLayer.Cropped := False; TIELayer.Cropped
CancelInteracts ImageEnView1.CancelTools(); TImageEnView.CancelTools
CenterNewObjects Not relevant. Items added in Stamp Mode are always centered loStampMode
EnableRangeObjectsSelection ImageEnView1.LayerOptions := ImageEnView1.LayerOptions + [loDragSelection]; loDragSelection
FindObjectAt idx := ImageEnView1.FindLayerAt() TImageEnView.FindLayerAt
IsEditMode ImageEnView1.LayersEditingLayer >= 0 TImageEnView.LayersEditingLayer
MaxMovingDistance No equivalent  
ObjEditOnNewText ImageEnView1.LayerOptions := ImageEnView1.LayerOptions + [ loAutoTextEditing ]; loAutoTextEditing
PolylineClosingMode ImageEnView1.LayersAutoClosePolylines := ...; TImageEnView.LayersAutoClosePolylines
PolylineEndingMode Not needed, polyline insertion always ends on double-click or Enter key  
SelectOnMouseDown No equivalent  
UseCentralGrip No equivalent  


Accessing Objects

TImageEnVect TImageEnView Equivalent More Information
GetObjFromID ImageEnView1.Layers[]. Layers are always referenced by index (where 0 is the background layer and LayersCount-1 is the foremost layer) TImageEnView.Layers
GetObjFromIndex Not needed. Layers are always referenced by index (where 0 is the background layer and LayersCount-1 is the foremost layer)  
GetObjFromName idx := ImageEnView1.LayersNameToIndex('Layer Name'); LayersNameToIndex
ObjectsCount ImageEnView1.LayersCount. Note: LayersCount also includes the background layer. So it is always >= 1 TImageEnView.LayersCount
IEV_NEXT_INSERTED_OBJECT ImageEnView1.LayerDefaults.Values[ IELP_BorderColor ] := '$008000FF'; Or use the OnNewLayer event TImageEnView.LayerDefaults
IEV_PREVIOUS_INSERTED_OBJECT ImageEnView1.LayersCurrent is the index of the previously inserted object (assuming selection has not changed) TImageEnView.LayersCurrent


Editing Objects

TImageEnVect TImageEnView Equivalent More Information
AddNewObject Call ImageEnView1.LayersAdd(); with the layer/object equivalents above... TImageEnView.LayersAdd
AddPolyLinePoint TIEPolylineLayer( ImageEnView1.CurrentLayer ).AddPoint( 1000, 1000 ); Note: By default, point values are specified in the range 0 - 1000 TIEPolylineLayer.AddPoint
AlignObjects ImageEnView1.LayersAlign(); TImageEnView.LayersAlign
CreateImageFromSelectedArea ImageEnView1.LayersCreateFromSelection(); TImageEnView.LayersCreateFromSelection
CreatePolygonFromEdge ImageEnView1.LayersCreateFromEdge(); TImageEnView.LayersCreateFromEdge
CreatePolygonsFromSelection ImageEnView1.LayersCreatePolylineFromSelection(); TImageEnView.LayersCreatePolylineFromSelection
GetIndexFromObj ImageEnView1.CurrentLayer.Index. Note:Index of 0 is the background layer TIELayer.Index
GetMemoFormattedString Get Rich formatted text string from TIETextLayer.RichText TIETextLayer.RichText
GetObjRect r := ImageEnView1.CurrentLayer.LayerRect; TIELayer.LayerRect
MaxTextLength No equivalent  
MemoEdit Use Editor parameter of OnActivateTextEditor event OnActivateTextEditor
MemoEditingGetCharInfo No equivalent  
MemoEditingSetCharInfo No equivalent  
ObjSetTBitmap TIEImageLayer( ImageEnView1.CurrentLayer).Bitmap.assign( aBMP ); Note: TIELayer.Bitmap is a TIEBitmap so it support all standard functionality, such as loading, saving, editing, etc. TIELayer.Bitmap
ObjTextEditMode TIETextLayer( ImageEnView1.CurrentLayer ).ActivateEditor(); TIETextLayer.ActivateEditor, TIELineLayer.ActivateEditor
RemoveAllObjects ImageEnView1.LayersClear( False ); TImageEnView.LayersClear
RemoveObject ImageEnView1.LayersRemove(1); TImageEnView.LayersRemove
RemovePolygonJaggedEdges TIEPolylineLayer( ImageEnView1.CurrentLayer ).SmoothJaggedEdges(); TIEPolylineLayer.SmoothJaggedEdges
RemovePolyLinePoint TIEPolylineLayer( ImageEnView1.CurrentLayer ).RemovePoint(); TIEPolylineLayer.RemovePoint
RotateAllObjects For i := 0 to ImageEnView1.LayersCount do ImageEnView1.Layers[i].Rotate := 45; TIELayer.Rotate
RotateObject ImageEnView1.CurrentLayer.Rotate := 45; TIELayer.Rotate
SetObjAnglePoints TIEAngleLayer( ImageEnView1.CurrentLayer ).SetPoints( [Point(10, 10), Point(50, 50), Point(10, 100)], iepbBitmap ); SetPoints
SetObjBackTo ImageEnView1.LayersArrange(); TImageEnView.LayersArrange
SetObjBitmapICO WindowsGetStockIcon( SIID_INFO, bmp ); TIEImageLayer( ImageEnView1.CurrentLayer).Bitmap.Assign( bmp ); WindowsGetStockIcon
SetObjFont TIETextLayer( ImageEnView1.CurrentLayer ).Font.Color := clBlue; TIETextLayer.Font, TIELineLayer.LabelFont
SetObjFrontOf ImageEnView1.LayersArrange(); TImageEnView.LayersArrange
SetObjPolylinePoints TIEPolylineLayer( ImageEnView1.CurrentLayer ).SetPoints(); TIEPolylineLayer.SetPoints
SetObjRect ImageEnView1.CurrentLayer.ClientAreaBox := Rect( ... ); TIELayer.ClientAreaBox
SetObjTextCurve No equivalent as TIETextLayer does not support curved text  
SetObjTextCurveFromPolyline No equivalent as TIETextLayer does not support curved text  
SetObjTextCurveShape No equivalent as TIETextLayer does not support curved text  
SimplifyPolygon TIEPolylineLayer( ImageEnView1.CurrentLayer ).SimplifyPolygon(); TIEPolylineLayer.SimplifyPolygon
StretchTextRect TIETextLayer( ImageEnView1.CurrentLayer ).SizeToText(); or TIETextLayer( ImageEnView1.CurrentLayer ).AutoSize := True; TIETextLayer.SizeToText


Rendering and Copying

TImageEnVect TImageEnView Equivalent More Information
CopyAllObjectsTo ImageEnView1.Assign(); Note: Assign will copy layers from one TImageEnView to another (including background) TImageEnView.Assign
CopyObjectsToBack ImageEnView1.LayersMergeAll(); TImageEnView.LayersMergeAll
CopyObjectToBack ImageEnView1.LayersMerge(); TImageEnView.LayersMerge
CopyObjectTo Use LayersAdd clone overload, e.g. ImageEnView2.LayersAdd( ImageEnView1.CurrentLayer ); TImageEnView.LayersAdd
DrawObjectsToBitmap ImageEnView1.LayersDrawTo(); TImageEnView.LayersDrawTo
DrawOneObjectToBitmap ImageEnView1.CurrentLayer.CopyToBitmap(); TIELayer.CopyToBitmap


Input/Output

TImageEnVect TImageEnView Equivalent More Information
ImportDXF ImageEnView1.LayersImport(); TImageEnView.LayersImport
LoadFromFileAll Import ALL files as layers using TImageEnView.LayersImport. Load layer files using TImageEnIO.LoadFromFileIEN TImageEnView.LayersImport
LoadFromFileIEV Import IEV files as layers using TImageEnView.LayersImport. Load layer files using TImageEnIO.LoadFromFileIEN TImageEnView.LayersImport
LoadFromStreamAll Import ALL files as layers using TImageEnView.LayersImport. Load layer files using TImageEnIO.LoadFromSreamIEN TImageEnView.LayersImport
LoadFromStreamIEV Import IEV files as layers using TImageEnView.LayersImport. Load layer files using TImageEnIO.LoadFromStreamIEN TImageEnView.LayersImport
LoadObjectsFromTIFF To import existing objects you would need to create a temorary TImageEnVect, load the objects and then copy them to your TImageEnView using TImageEnVect.CopyAllObjectsTo. TImageEnVect.CopyAllObjectsTo
SaveObjectsToTIFF To save layers to the meta data of JPEG or TIFF images use ImageEnView1.IO.Params.ImagingAnnot.CopyFromTImageEnView(); TIEImagingAnnot.CopyFromTImageEnView
SaveToFileAll Save layers to file using TImageEnIO.SaveToFile() TImageEnIO.SaveToFileIEN
SaveToFileIEV Save layers to file using TImageEnIO.SaveToFile() TImageEnIO.SaveToFileIEN
SaveToStreamAll Save layers to file using TImageEnIO.SaveToStream() TImageEnIO.SaveToStreamIEN
SaveToStreamIEV Save layers to file using TImageEnIO.SaveToStream() TImageEnIO.SaveToStreamIEN
SetObjBitmapFromFile ImageEnView1.CurrentLayer.Bitmap.Read(); TIELayer.Bitmap
SetObjBitmapFromStream ImageEnView1.CurrentLayer.Bitmap.Read(); TIELayer.Bitmap


Clipboard

TImageEnVect TImageEnView Equivalent More Information
ObjCopyToClipboard ImageEnView1.Proc.CopyToClipboard(); Note: Pass iecpLayer to limit to layers TImageEnProc.CopyToClipboard
ObjCutToClipboard ImageEnView1.Proc.CutToClipboard(); Note: Pass iecpLayer to limit to layers TImageEnProc.CutToClipboard
ObjIsClipboardAvailable ImageEnView1.Proc.CanPasteFromClipboard(); Note: Pass iecpLayer to limit to layers TImageEnProc.CanPasteFromClipboard
ObjPasteFromClipboard ImageEnView1.Proc.PasteFromClipboard(); Note: Pass iecpLayer to limit to layers TImageEnProc.PasteFromClipboard


Object Properties

TImageEnVect TImageEnView Equivalent More Information
ObjAnchorToLayers Not relevant  
ObjAngleShowSmall TIEAngleLayer( ImageEnView1.CurrentLayer ).AngleMode := ieaSmallOnly; AngleMode
ObjAnglePoints pt := TIEAngleLayer( ImageEnView1.CurrentLayer ).Points[ idx ]; Points
ObjArcEndingAngle Use Arc overload of TIEPolylineLayer.SetPoints or Curve property of TIELineLayer TIEPolylineLayer.SetPoints
ObjArcStartingAngle Use Arc overload of TIEPolylineLayer.SetPoints or Curve property of TIELineLayer TIEPolylineLayer.SetPoints
ObjAspectRatio ImageEnView1.CurrentLayer.AspectRatioLocked := True; TIELayer.AspectRatioLocked
ObjBeginShape TIELineLayer( ImageEnView1.CurrentLayer ).StartShape := ieesArrow; TIELineLayer.StartShape
ObjBitmapAlpha Use TIEImageLayer( ImageEnView1.CurrentLayer ).Bitmap.AlphaChannel... Note: TIELayer.Bitmap is a TIEBitmap TIEImageLayer.Bitmap
ObjBitmapBorder ImageEnView1.CurrentLayer.BorderWidth := 2; TIELayer.BorderWidth
ObjBitmap TIEImageLayer( ImageEnView1.CurrentLayer ).Bitmap Note: TIELayer.Bitmap is a TIEBitmap TIEImageLayer.Bitmap
ObjBlendOperation ImageEnView1.CurrentLayer.Operation TIELayer.Operation
ObjBottom bottom := ImageEnView1.CurrentLayer.PosY + ImageEnView1.CurrentLayer.Height; TIELayer.PosY, TIELayer.Height
ObjBoxHighLight Set a solid fill color and semi-opacity TIELayer.FillColor, TIELayer.Opacity
ObjBoxInnerSelectable ImageEnView1.SelectionOptions := ImageEnView1.SelectionOptions + [ iesoSelectTranspLayers ]; TImageEnView.SelectionOptions
ObjBrushColor ImageEnView1.CurrentLayer.FillColor := clRed; TIELayer.FillColor
ObjBrushStyle No equivalent as layers do not use brush styles  
ObjEndShape TIELineLayer( ImageEnView1.CurrentLayer ).EndShape := ieesArrow; TIELineLayer.EndShape
ObjFontAngle ImageEnView1.CurrentLayer.Rotate := 45; Note: Text rotates with layer TIELayer.Rotate
ObjFontHeight TIETextLayer( ImageEnView1.CurrentLayer ).Font.Height := 18; TIETextLayer.Font, TIELineLayer.LabelFont
ObjFontLocked ImageEnView1.CurrentLayer.Locked := True; TIELayer.Locked
ObjFontName ImageEnView1.CurrentLayer.Name := 'Mask Layer'; TIELayer.Name
ObjFontStyles TIETextLayer( ImageEnView1.CurrentLayer ).Font.Style := [ fsBold ]; TIETextLayer.Font, TIELineLayer.LabelFont
ObjFontQuality Not relevant as layers are always output at quality (when not previewing)  
ObjGroupIndex ImageEnView1.CurrentLayer.GroupIndex := 5; TIELayer.GroupIndex
ObjHeight ImageEnView1.CurrentLayer.Height := 200; TIELayer.Height
ObjID Not relevant as TIELayers do not use an ID. They can be referenced by their index  
ObjIsVisible ImageEnView1.CurrentLayer.Visible := true; TIELayer.Visible
ObjKind ImageEnView1.CurrentLayer.Kind. See layer and object equivalents above... TIELayer.Kind
ObjLabelBorder TIELineLayer( ImageEnView1.CurrentLayer ).LabelBorderWidth := 2; TIELineLayer.LabelBorderWidth
ObjLabelBrushColor TIELineLayer( ImageEnView1.CurrentLayer ).LabelFillColor := clRed; TIELineLayer.LabelFillColor
ObjLabelBrushStyle No equivalent as layers do not use brush styles  
ObjLabelPosition TIELineLayer( ImageEnView1.CurrentLayer ).LabelPosition := ielpAbove; TIELineLayer.LabelPosition
ObjLayer Not relevant  
ObjLeft ImageEnView1.CurrentLayer.Left := 0; TIELayer.PosX
ObjMemoBorderColor ImageEnView1.CurrentLayer.BorderColor := clBlue; TIELayer.BorderColor
ObjMemoBorderStyle No equivalent. Borders are always solid colors  
ObjMemoCharsBrushStyle No equivalent  
ObjMemoFixedHeight No equivalent  
ObjMemoHasBitmap Place a TIEImageLayer behind, set FillColor to clNone and group the two layers  
ObjMemoLineSpace No equivalent  
ObjMemoMarginBottom TIETextLayer( ImageEnView1.CurrentLayer ).VertMargin := 0; Note: Same value used for both top and bottom TIETextLayer.VertMargin
ObjMemoMarginLeft TIETextLayer( ImageEnView1.CurrentLayer ).HorzMargin := 0; Note: Same value used for both left and right TIETextLayer.HorzMargin
ObjMemoMarginRight TIETextLayer( ImageEnView1.CurrentLayer ).HorzMargin := 0; Note: Same value used for both left and right TIETextLayer.HorzMargin
ObjMemoMarginTop TIETextLayer( ImageEnView1.CurrentLayer ).VertMargin := 0; Note: Same value used for both top and bottom TIETextLayer.VertMargin
ObjName ImageEnView1.CurrentLayer.Name := 'Mask layer'; TIELayer.Name
ObjPenColor ImageEnView1.CurrentLayer.BorderColor := clRed; TIELayer.BorderColor
ObjPenStyle No equivalent as Pen styles are not used for layers. Borders are always solid colors  
ObjPenWidth ImageEnView1.CurrentLayer.BorderWidth := 2; TIELayer.BorderWidth
ObjPolylineClosed TIEPolylineLayer( ImageEnView1.CurrentLayer ).PolylineClosed := True; TIEPolylineLayer.PolylineClosed
ObjPolylinePointsCount n := TIEPolylineLayer( ImageEnView1.CurrentLayer ).PointCount; TIEPolylineLayer.PointCount
ObjPolylinePoints TIEPolylineLayer( ImageEnView1.CurrentLayer ).Points TIEPolylineLayer.Points
ObjRight right := ImageEnView1.CurrentLayer.PosX + ImageEnView1.CurrentLayer.Width; TIELayer.PosX, TIELayer.Width
ObjRulerQuoteHorizon TIELineLayer( ImageEnView1.CurrentLayer ).LabelPosition := ielpAbove; TIELineLayer.LabelPosition
ObjRulerType TIELineLayer( ImageEnView1.CurrentLayer ).LabelPosition := ielpAbove; TIELineLayer.LabelPosition
ObjRulerUnit ImageEnView1.CurrentLayer.RulerUnit := ...; TIELayer.RulerUnits
ObjShapeHeight TIELineLayer( ImageEnView1.CurrentLayer ).ShapeSize := 30; Note: Same value applies to both height and width TIELineLayer.ShapeSize
ObjShapeWidth TIELineLayer( ImageEnView1.CurrentLayer ).ShapeSize := 30; Note: Same value applies to both height and width TIELineLayer.ShapeSize
ObjSoftShadow ImageEnView1.CurrentLayer.SoftShadow TIELayer.SoftShadow
ObjStyle See equivalents below...  
ievsSelectable ImageEnView1.CurrentLayer.Selectable := True; TIELayer.Selectable
ievsMoveable ImageEnView1.CurrentLayer.Locked := True; Note: When a layer is locked, it cannot be moved or sized. You can use TImageEnView.OnLayerMoveSize to provide more specialized locking TIELayer.Locked
ievsSizeable ImageEnView1.CurrentLayer.Locked := True; Note: When a layer is locked, it cannot be moved or sized. You can use TImageEnView.OnLayerMoveSize to provide more specialized locking TIELayer.Locked
ievsVisible ImageEnView1.CurrentLayer.Visible := True; TIELayer.Visible
ievsHideGrips No equivalent. Grips are always shown if the object can be sized  
ObjTextAlign TIETextLayer( ImageEnView1.CurrentLayer ).Alignment := ielCenter; TIETextLayer.Alignment, TIELineLayer.LabelAlignment
ObjTextAutoSize TIETextLayer( ImageEnView1.CurrentLayer ).AutoSize := True; TIETextLayer.AutoSize
ObjTextCurveCharRot No equivalent as TIETextLayer does not support curved text  
ObjTextEditable ImageEnView1.CurrentLayer.ReadOnly := True; TIETextLayer.ReadOnly
ObjTextMaintainAlignmentOnRotate No equivalent  
ObjText TIETextLayer( ImageEnView1.CurrentLayer ).Text := 'ABC'; TIETextLayer.Text, TIELineLayer.LabelText
ObjTop ImageEnView1.CurrentLayer.Top := 100; TIELayer.PosY
ObjTransparency ImageEnView1.CurrentLayer.Transparency := 128; Note: Generally TIELayer.Opacity is used instead TIELayer.Transparency, TIELayer.Opacity
ObjUserDataLength ImageEnView1.CurrentLayer.UserDataLen TIELayer.UserDataLen
ObjUserData ImageEnView1.CurrentLayer.UserData TIELayer.UserData
ObjWidth ImageEnView1.CurrentLayer.Width := 200; TIELayer.Width


Measurement

TImageEnVect TImageEnView Equivalent More Information
FloatDigits IEGlobalSettings().MeasureDecimalPlaces := 1; TIEImageEnGlobalSettings.MeasureDecimalPlaces
FloatPrecision IEGlobalSettings().MeasureDecimalPlaces := 1; TIEImageEnGlobalSettings.MeasureDecimalPlaces
GetAngleValue angle := TIEAngleLayer( ImageEnView1.CurrentLayer ).SweepAngle; SweepAngle
GetObjDiagLen d := ImageEnView1.CurrentLayer.RulerValue; TIELayer.RulerValue
GetPolylineArea d := TIEPolylineLayer( ImageEnView1.CurrentLayer ).CalculateArea( ieuInches ); TIEPolylineLayer.CalculateArea
GetPolylineCentroid No equivalent  
GetPolylineLen d := TIEPolylineLayer( ImageEnView1.CurrentLayer ).CalculateLength( ieuInches ); TIEPolylineLayer.CalculateLength
GetSelectionArea a := ImageEnView1.CalcSelectionArea(); CalcSelectionArea
GetSelectionCentroid ctrPt := ImageEnView1.CalcSelectionCentroid(); CalcSelectionCentroid
GetSelectionLen l := ImageEnView1.CalcSelectionLen(); CalcSelectionLen
MeasureCoefX ImageEnView1.IO.Params.DpiX := 100; TImageEnView.IO.Params.DpiX
MeasureCoefY ImageEnView1.IO.Params.DpiY := 100; TImageEnView.IO.Params.DpiY
MeasureHintBorder1 Interactive hints are styled by IEGlobalSettings().HintStyle HintStyle
MeasureHintBorder2 Interactive hints are styled by IEGlobalSettings().HintStyle HintStyle
MeasureHintBrush Interactive hints are styled by IEGlobalSettings().HintStyle HintStyle
MeasureHintFont The font for hints is controlled by IEGlobalSettings().DefaultDialogFont DefaultDialogFont
MeasureTrack No equivalent  
MUnit ImageEnView1.CurrentLayer.RulerUnits := ...; TIELayer.RulerUnits
ScaleFactor No equivalent TImageEnView.ScaleX/ScaleY
SetScaleFromPixels ImageEnView1.SetScale( 100, 4, ieuCentimeters ); SetScale
SetScaleFromSelectionLen ImageEnView1.SetScale( ImageEnView1.SelectedRect.Width, 1, ImageEnView1.SelectedRect.Height, 1, ieuInches ); SetScale


Grips

TImageEnVect TImageEnView Equivalent More Information
ObjGripBrush ImageEnView1.SetLayersGripStyle(clWhite, clWhite, bsSolid, 5, iegsCircle); TImageEnView.SetLayersGripStyle
ObjGripImage No equivalent  
ObjGripPen ImageEnView1.SetLayersGripStyle(clWhite, clWhite, bsSolid, 5, iegsCircle); TImageEnView.SetLayersGripStyle
ObjGripShape ImageEnView1.SetLayersGripStyle(clWhite, clWhite, bsSolid, 5, iegsCircle); TImageEnView.SetLayersGripStyle
ObjGripSize ImageEnView1.SetLayersGripStyle(clWhite, clWhite, bsSolid, 5, iegsCircle); TImageEnView.SetLayersGripStyle


Selection

TImageEnVect TImageEnView Equivalent More Information
AddSelObject ImageEnView1.Layers[2].Selected := True; TIELayer.Selected
CopySelectedObjectsTo ImageEnView1.Assign(); Note: Assign will also copy all layers (including the background) TIMageEnView.Assign
GroupObjects ImageEnView1.LayersGroup(); TImageEnView.LayersGroup
IsSelObject if ImageEnView1.CurrentLayer.Selected then... TIELayer.Selected
MaxSelectionDistance No equivalent  
SelAllObjects ImageEnView1.LayersSelectAll(); TImageEnView.LayersSelectAll
SelObjects Rather than iterating through selected layers, iterate through all layers and check whether the layer is selected, e.g. for i := 0 to ImageEnView1.LayersCount - 1 do if ImageEnView1.Layers[i].Selected then... TIELayer.Selected
SelObjectsCount n := ImageEnView1.LayersSelCount; TImageEnView.LayersSelCount
UnSelAllObjects ImageEnView1.LayersDeselectAll(); TImageEnView.LayersDeselectAll
UnSelObject ImageEnView1.Layers[2].Selected :=False; TIELayer.Selected
UngroupObjects ImageEnView1.LayersUngroup(); TImageEnView.LayersUngroup


Undo/Redo

TImageEnVect TImageEnView Equivalent More Information
ObjAutoUndo Enable loAutoUndoChangesByUser in TImageEnView.LayerOptions and TImageEnProc.AutoUndo TImageEnProc.AutoUndo, TImageEnView.LayerOptions
ObjCanUndo b := ImageEnView1.Proc.CanUndo; TImageEnProc.CanUndo
ObjClearAllUndo ImageEnView1.Proc.ClearAllUndo(); TImageEnProc.ClearAllUndo
ObjClearUndo ImageEnView1.Proc.ClearUndo(); TImageEnProc.ClearUndo
ObjSaveUndo ImageEnView1.Proc.SaveUndo(); TImageEnProc.SaveUndo
ObjUndo ImageEnView1.Proc.Undo(); TImageEnProc.Undo
ObjUndoAt ImageEnView1.Proc.UndoAt( 2 ); TImageEnProc.UndoAt
ObjUndoCount n := ImageEnView1.Proc.UndoCount; TImageEnProc.UndoCount
ObjUndoLimit ImageEnView1.Proc.UndoLimit := 30; TImageEnProc.UndoLimit
ObjUndoMode See undo items of TImageEnView.LayerOptions TImageEnView.LayerOptions


Others

TImageEnVect TImageEnView Equivalent More Information
InsertingPen ImageEnView1.CurrentLayer.BorderWidth TIELayer.BorderWidth
ShareBitmaps No equivalent  


Events

TImageEnVect TImageEnView Equivalent More Information
OnActivateTextEdit TImageEnView.OnActivateTextEditor event TImageEnView.OnActivateTextEditor
OnAfterDrawObject TImageEnView.OnDrawLayer event TImageEnView.OnDrawLayer
OnBeforeDrawObject TImageEnView.OnDrawBackground event TImageEnView.OnDrawBackground
OnBeforeVectorialChanged Various events items of TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnDeactivateTextEdit Check for ielEdited in TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnDragLenEnd TImageEnView.OnMeasure event TImageEnView.OnMeasure
OnMeasureHint TImageEnView.OnInteractionHint event TImageEnView.OnInteractionHint
OnNewObject TImageEnView.OnNewLayer event TImageEnView.OnNewLayer
OnObjectClick Check for ielLeftClicked or ielRightClicked in TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnObjectDblClick Check for ielDblClicked in TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnObjectMoveResize TImageEnView.OnLayerMoveSize event TImageEnView.OnLayerMoveSize
OnObjectOver Check for ielMouseOver in TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnPresentMeasure TImageEnView.OnInteractionHint event TImageEnView.OnInteractionHint
OnSelectObject TImageEnView.OnLayerSelectionChange event TImageEnView.OnLayerSelectionChange
OnTextEdit Check for ielEdited or ielTextEditorChange in TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnTextEditCursorMoved Check for ielTextEditorClick in TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnTextKeyDown TImageEnView.OnTextEditorKeyDown event TImageEnView.OnTextEditorKeyDown
OnUserDeselectObject Check for ielDeselected in TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnUserSelectObject Check for ielSelected of TImageEnView.OnLayerNotifyEx TImageEnView.OnLayerNotifyEx
OnVectorialChanged Check TImageEnView.OnLayerNotifyEx or TImageEnView.OnImageChange TImageEnView.OnLayerNotifyEx