ImageEn, unit iexActionsLayers

TImageEnView Layer Actions

TImageEnView Layer Actions


ImageEn includes a large set of actions for Layer, ImageEnView general methods, ImageEnMView , ImageEnFolderMView and ImageEnVect components to allow you to rapidly develop your UI.

TImageEnViewLayersShowPropertiesDialog




To use actions:


1. Add a TActionList component to your form
2. Double-click your TActionList to open it
3. Select "New Standard Action"
4. Scroll down to the ImageEnView actions, select the ones you require and click OK
5. Select your actions and set the ImageEnView property to your TImageEnView component
6. Assign the actions to menu items and buttons


Demos


  Demos\Actions\Actions_Viewer\Actions.dpr
  Demos\Actions\Actions_Layers\Actions.dpr
  Demos\Actions\AllActions\AllActions.dpr



Notes:


- You must set the ImageEnView property of the actions
- The ActionType property advises whether the control only performs a function (ieaButton), toggles a state (ieaCheckbox), or changes between multiple states (ieaRadioButton)
- You can set MsgLanguage to localize the actions
- See the list of the default ImageIndexes if you are planning to add graphics to your actions


Layer Actions


Action Name Description Associated Method Extra Properties
TImageEnViewLayersAdd Add Layer Add a new layer to this image * LayersAdd UseNewLayerDialog, LayerKind
TImageEnViewImageLayersAdd Add Image Layer Add a new image layer to this image * LayersAdd UseNewLayerDialog
TImageEnViewShapeLayersAdd Add Shape Layer Add a new shape layer to this image * LayersAdd UseNewLayerDialog, Shape
TImageEnViewLineLayersAdd Add Line Layer Add a new line layer to this image * LayersAdd UseNewLayerDialog
TImageEnViewPolylineLayersAdd Add Polyline Layer Add a new polyline layer to this image * LayersAdd UseNewLayerDialog
TImageEnViewAngleLayersAdd Add Angle Layer Add a new angle layer to this image * LayersAdd UseNewLayerDialog
TImageEnViewTextLayersAdd Add Text Layer Add a new text layer to this image * LayersAdd UseNewLayerDialog, DefaultText
TImageEnViewLayersCreateFromFile Load File as Layer... Prompts for an image file and loads it as a new layer LayersCreateFromFile -
TImageEnViewLayersCropBackground Crop Background to Selection Crop the background image to match selected layers LayersCropBackground FillAlpha, AllowReduce, AllowEnlarge
TImageEnViewLayersCropBackgroundAll Crop Background to Layers Crop the background image to fit all layers LayersCropBackground FillAlpha, AllowReduce, AllowEnlarge
TImageEnViewLayersDeselectAll Deselect All Layers Deselect all layers of the image LayersDeselectAll -
TImageEnViewLayersFastDrawing Fast Preview Reduce preview quality to improve performance LayersFastDrawing, ZoomFilter, DelayZoomFilter, LayersRotationUseFilterOnPreview DelayedHighQuality, ZoomFilter
TImageEnViewLayersMerge Merge Layers Merge selected layers into a single layer LayersMerge -
TImageEnViewLayersMergeAll Merge All Layers Merge all layers of the image into a single layer LayersMergeAll -
TImageEnViewLayersPromptToOpen Open Load layers from a file ExecuteOpenDialog, LoadFromFile DialogTitle, LockToIEN, FileName
TImageEnViewLayersPromptToSave Save as Save layers to a new filename ExecuteSaveDialog, SaveToFile DialogTitle, LockToIEN, FileName
TImageEnViewLayersRemoveCurrent Remove Layer Remove the selected layers from the image LayersRemove -
TImageEnViewLayersSave Save Save changes to file SaveToFile EnableOnlyWhenChanged, FileName
TImageEnViewLayersSelectAll Select All Layers Select all layers of the image LayersSelectAll -



Layer Alignment Actions


Action Name Description Associated Method Extra Properties
TImageEnViewLayersAlignLeftEdges Align on Left Align selected layers to the edge of the left-most layer ilaAlignLeftEdges -
TImageEnViewLayersAlignRightEdges Align on Right Align selected layers to the edge of the right-most layer ilaAlignRightEdges -
TImageEnViewLayersAlignTopEdges Align Tops Align selected layers to the edge of the top-most layer ilaAlignTopEdges -
TImageEnViewLayersAlignBottomEdges Align Bottoms Align selected layers to the edge of the bottom-most layer ilaAlignBottomEdges -
TImageEnViewLayersAlignHorizontalCenters Align Horizontal Centers Align selected layers to have the same horizontal center ilaAlignHorizontalCenters -
TImageEnViewLayersAlignVerticalCenters Align Vertical Centers Align selected layers to have the same vertical center ilaAlignVerticalCenters -
TImageEnViewLayersMatchWidth Match Widths Resize all selected layers to the width of the widest layer ilaMatchWidth -
TImageEnViewLayersMatchHeight Match Heights Resize all selected layers to the height of the tallest layer ilaMatchHeight -



Layer Property Actions


TIELayerAspectRatioLocked Lock Aspect Ratio Prevent resizing from affecting the aspect ratio of the selected layer AspectRatioLocked -
TIELayerConvertToImageLayer Convert to Image Layer Convert the layer to an image ConvertToImageLayer QualityFactor, CropAlpha, ConvertImages
TIELayerConvertToPolylineLayer Convert to Polyline Layer Convert the layer to editable points ConvertToPolylineLayer -
TIELayerCropped Crop Layer to Background Hide any part of the layer that is outside the background Cropped -
TIELayerEditText Edit Layer Text Edit the text of the selected layer Text/LabelText UseDialog
TIELayerLocked Lock Position Prevent movement of the selected layer Locked -
TIELayerIsMask Use as Mask Use layer to mask content of the layer below IsMask -
TIELayerResetRotate Reset Rotation Reset the rotation of the selected layer Rotate -
TIEAngleLayerInvertAngle Invert Angle Inverts the direction of the angle InvertAngle -
TIELayerRestoreAspectRatio Restore Aspect Ratio Restore the original aspect ratio of the selected layer RestoreAspectRatio PreferredOnly
TIELayerRotateLeft Rotate Left Rotate the layer counter-clockwise Rotate RotateDegrees
TIELayerRotateRight Rotate Right Rotate the layer clockwise Rotate RotateDegrees
TIELayerSizeToFit Size to Fit Resize the layer to match its content SizeToFit, SizeToText -
TIELayerSoftShadow Soft Shadow Add a soft shadow to the selected layer SoftShadow Radius, Intensity, ShadowColor
TIELayerVisible Visible Display the current layer Visible -
TIEImageLayerRestoreSize Reset Size Restore the original size of the selected layer RestoreSize -
TIEImageLayerExecuteOpenDialog Select Image Browse for an image to load into the layer ExecuteOpenDialog -
TIELineLayerShowLabel Show Label Attach a text label to the selected layer LabelPosition -
TIEPolylineLayerPolylineClosed Close Polyline Join the first and last points of the polyline to create a polygon PolylineClosed -
TImageEnViewLayersFixBorders Crop Transparency Remove transparent borders from the selected layers LayersFixBorders -
TImageEnViewLayersGroup Group Layers Add selected layers to a selection group LayersGroup -
TImageEnViewLayersMoveBringToFront Bring to Front Bring the selected layer to the front of all others LayersArrange -
TImageEnViewLayersMoveBringForward Bring Forward Move the selected layer forward LayersArrange -
TImageEnViewLayersMoveSendToBack Send to Back Position the selected layer behind all others LayersArrange -
TImageEnViewLayersMoveSendBackward Send Backwards Move the selected layer backward LayersArrange -
TImageEnViewLayersUngroup Ungroup Layers Remove selected layers from selection group LayersUngroup -
TIELayerFontSelect Select Font Select a font for the selected TIETextLayer or TIELineLayer SetTextProperties -
TIELayerFontEnlarge Enlarge Font Enlarge the font size for the selected TIETextLayer or TIELineLayer SetTextProperties AdjustAmount
TIELayerFontReduce Reduce Font Reduce the font size for the selected TIETextLayer or TIELineLayer SetTextProperties AdjustAmount
TIELayerTextAlignLeft Align Text Left Left align the text for the selected TIETextLayer or TIELineLayer SetTextProperties -
TIELayerTextAlignRight Align Text Right Right align the text for the selected TIETextLayer or TIELineLayer SetTextProperties -
TIELayerTextAlignCenter Center Text Center the text for the selected TIETextLayer or TIELineLayer SetTextProperties -
TIETextLayerWordWrap Wordwrap Allow multi-line text WordWrap -
TIELayerRulerMode Ruler Mode Caption displays length/area of layer IsRuler, IsRuler -
TIELayerEdgeFeathering Feather Edges Soften the edges of the layer with transparent feathering AlphaEdgeFeathering FeatheringValue
TIELayerAutoSize Auto-Size Automatically size the layer to fit the content AutoSize, AutoSize -
TImageEnViewLayersShowPropertiesDialog Show Properties Dialog Display the Layer Properties dialog to allow the user to modify properties of the selected layer LayersShowPropertiesDialog -



Layer Mouse Actions


Action Name Description Associated Method Extra Properties
TImageEnViewMouseEditLayers Edit Layers Use the mouse to move, resize and rotate layers mlMoveLayers, mlRotateLayers and mlResizeLayers AllowPointEditing (mlEditLayerPoints)
TImageEnViewMouseEditLayerPoints Edit Layer Points Click on a line to add a point. Ctrl-click to remove a point. Hold Alt to create a curve mlEditLayerPoints AllowOtherEditing (mlMoveLayers, mlRotateLayers and mlResizeLayers)
TImageEnViewMouseMoveLayers Move Layers Use the mouse to move layers mlMoveLayers -
TImageEnViewMouseResizeLayers Resize Layers Use the mouse to resize layers mlResizeLayers -
TImageEnViewMouseRotateLayers Rotate Layers Use the mouse to rotate layers mlRotateLayers -
TImageEnViewMouseCreateImageLayers Add Image Layer (by dragging a rect) Click and drag to create an image layer * mlCreateImageLayers (creates a TIEImageLayer) PromptForImage, Exclusive, AllowEditing (mlMoveLayers and mlResizeLayers)
TImageEnViewMouseCreateShapeLayers Add Shape Layer (by dragging a rect) Click and drag to create a shape layer * mlCreateShapeLayers (creates a TIEShapeLayer) Exclusive, AllowEditing (mlMoveLayers and mlResizeLayers)
TImageEnViewMouseCreateLineLayers Add Line Layer (by dragging a rect) Click and drag to create a line layer * mlCreateLineLayers (creates a TIELineLayer) Exclusive, AllowEditing (mlMoveLayers and mlResizeLayers)
TImageEnViewMouseClickCreateLineLayers Add Line Layer (by clicking 2 points) Click two points to create a line layer * mlClickCreateLineLayers (creates a TIELineLayer) Exclusive, AllowEditing (mlEditLayerPoints)
TImageEnViewMouseCreatePolylineLayers Add Polyline Layer (by dragging a rect) Click and drag to create a polyline layer * mlCreatePolylineLayers (creates a TIEPolylineLayer) Exclusive, AllowEditing (mlMoveLayers and mlResizeLayers)
TImageEnViewMouseClickCreatePolylineLayers Add Polyline Layer (by clicking points) Click multiple points to create a polyline layer * mlClickCreatePolylineLayers (creates a TIEPolylineLayer) Exclusive, AllowEditing (mlEditLayerPoints)
TImageEnViewMouseDrawCreatePolylineLayers Add Polyline Layer (by drawing) Click and drag to draw a polyline layer * mlDrawCreatePolylineLayers (creates a TIEPolylineLayer) Exclusive, AllowEditing (mlEditLayerPoints)
TImageEnViewMouseCreateAngleLayers Add Angle Layer (by dragging a rect) Click and drag to create an angle layer * mlCreateLineLayers (creates a TIEAngleLayer) Exclusive, AllowEditing (mlMoveLayers and mlResizeLayers)
TImageEnViewMouseClickCreateAngleLayers Add Angle Layer (by clicking 3 points) Click three points to create an angle layer * mlClickCreateAngleLayers (creates a TIEAngleLayer) Exclusive, AllowEditing (mlEditLayerPoints)
TImageEnViewMouseCreateTextLayers Add Text Layer (by dragging a rect) Click and drag to create a text layer * mlCreateTextLayers (creates a TIETextLayer) Exclusive, AllowEditing (mlMoveLayers and mlResizeLayers)

* Use OnNewLayer or LayerDefaults to set properties of the new layer