ImageEn, unit iexLayers

TIEImageLayer


Declaration

TIEImageLayer = class(TIELayer);


Description

TImageEnView supports multiple layers, allowing the creation of a single image from multiple source images (which can be resized, rotated, moved, etc).
TIEImageLayer is a descendent of TIELayer which contains an image.


You can create image layers with code using LayersAdd or by user action by setting MouseInteractLayers to mlCreateImageLayers.

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


Demos

Demo Description Demo Project Folder Compiled Demo
Image Layer Editing Usage of image layers LayerEditing\Layers_Images\Layers.dpr   
All Layer Editing Usage of image, shape, text, polygon and line layers LayerEditing\Layers_AllTypes\Layers.dpr   
Stamp Layers Add text, shapes, images and arrows directly to an image by clicking and dragging LayerEditing\StampTextAndShapes\StampLayers.dpr   


Examples

// Load an image layer and apply a pink border
ImageEnView1.LayersAdd( ielkImage );                 // Append an image layer
ImageEnView1.IO.LoadFromFile('C:\New Zealand.jpg');  // Load image into the new/active layer
ImageEnView1.CurrentLayer.BorderColor := $008000FF;
ImageEnView1.CurrentLayer.BorderWidth := 3;
ImageEnView1.Update();


// Fix the aspect ratio of an image (that has been resized)
if ImageEnView1.CurrentLayer is TIEImageLayer then
  ImageEnView1.CurrentLayer.RestoreAspectRatio();
ImageEnView1.Update();

// Allow users to create and edit image layers
ImageEnView1.LayerOptions := ImageEnView1.LayerOptions + [ loAutoPromptForImage ]; // Prompt user to browse for image
ImageEnView1.MouseInteractLayers := [ mlCreateImageLayers, mlMoveLayers, mlResizeLayers ];



Methods and Properties

General
Public Method  Assign
Public Method  CopyToBitmap
Public Property  DrawingInfo
Public Property  DrawOuter
Public Method  DrawToCanvas
Public Method  GetLayerMask
Public Method  GetProperties
Public Property  Guid
Public Property  GroupIndex
Public Property  Hint
Public Property  IsMask
Public Property  Kind
Public Property  LayerIndex
Public Property  Locked
Public Property  MaskInverted
Public Property  Modified
Public Property  ModifiedDate
Public Property  Magnify
Public Property  Name
Public Property  Selectable
Public Property  Selected
Public Method  SetProperties
Public Method  SupportsFeature
Public Property  Tag
Public Property  URL
Public Property  UserData
Public Property  UserDataLen
Public Property  Visible
Public Property  VisibleBox

Image Access
Public Property  Bitmap
Public Method  Clear
Public Method  CropAlpha
Public Method  ExecuteOpenDialog

Style
Public Property  AlphaEdgeFeathering
Public Property  BorderColor
Public Property  BorderWidth
Public Property  Cropped
Public Property  Flip
Public Property  InnerGlow
Public Property  Opacity
Public Property  Operation
Public Property  ResampleFilter
Public Property  Rotate
Public Property  RotateCenterX
Public Property  RotateCenterY
Public Property  ScaleLocking
Public Property  SoftShadow
Public Property  UseResampleFilter

Size and Position
Public Property  AspectRatioLocked
Public Property  ClientAreaBox
Public Method  ConvXBmp2Scr
Public Method  ConvXScr2Bmp
Public Method  ConvYBmp2Scr
Public Method  ConvYScr2Bmp
Public Property  Height
Public Property  PosX
Public Property  PosY
Public Method  PreferredAspectRatio
Public Method  RestoreAspectRatio
Public Method  RestoreSize
Public Property  Width

 Unique to TIEImageLayer



See Also

 Layer Editing Overview
 LayersAdd
 LayersInsert
 TIELayerKind
 MouseInteractLayers