ImageEn, unit iexUserInteractions

TIECloneToolInteraction


Declaration

TIECloneToolInteraction = class(TIECursorToolInteraction);


Description

A class of TIEUserInteraction that controls interaction for the Clone tool (when MouseInteractGeneral is miCloneTool).
The clone tool allows the user to copy content of one part of an image to apply elsewhere, e.g. to erase unwanted content. When used with a tablet/pen, then pressure will affect the clone brush size and/or opacity.



The process is as follows:
1. User clicks the image to specify a clone source point
2. User clicks elsewhere on the image to copy the content from the source point to the destination
3. User can continue to click or drag to clone content, which will be copied with the same offset as the cloning in step 2

Note:
You can hold the Shift key to snap movement to the axes
To improve performance, enable DelayDisplaySelection, which will delay full quality painting until the final render
If you encounter cursor flickering, you should set ImageEnView1.DoubleBuffered := True;


Examples

// Enable Clone mode
ImageEnView1.MouseInteractGeneral := [miCloneTool];

// Cancel Clone tool (same as user clicking "Esc") so user will need to click again to select a clone source
ImageEnView1.CloneTool.Cancel();

// Show clone brush properties dialog
ImageEnView1.MouseInteractGeneral := [miCloneTool];
ImageEnView1.BrushShowPropertiesDialog();


Demos

Demo  Demos\ImageEditing\CloneTool\CloneBrush.dpr
Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr

Methods and Properties


General Properties
Public Property  BrushHeight
Public Property  BrushShape
Public Property  BrushSize
Public Property  BrushWidth
Public Property  Feathering
Public Property  Operation
Public Property  PaintMode
Public Property  PenEffects
Public Property  Transparency

Cloning Operation
Public Method  AddToCloning
Public Method  Cancel (Same as clicking "Esc")
Public Property  ClipToBounds
Public Method  EndCloning
Public Property  SourceSelected
Public Property  SourceOffset
Public Property  SourcePoint
Public Method  StartCloning

Other
Public Method  GetBrushPreview


See Also

ImageEn Interactive Tools
BrushShowPropertiesDialog
OnUserInteraction
TImageEnView Actions