ImageEn, unit iexUserInteractions |
|
TIECloneToolInteraction.AddToCloning
Declaration
function AddToCloning(BmpX, BmpY: Integer): boolean;
Description
Add extra destination points to a programmatic cloning operation.
Normally, cloning operations are performed by the user via
miCloneTool, but it can be performed with code using:
1. Set the
offset of the clone source
2. Start cloning using
StartCloning3. Add extra points to the cloning operation using
AddToCloning (Optional)
4. Enact the cloning changes using
EndCloningExample
// Clone a line of content from 200 pixels above
ImageEnView1.CloneTool.SourceOffset := Point( 0, -200 ); // Source is 200 pixels above the destination
ImageEnView1.CloneTool.StartCloning( 50, 250 ); // Start at 50,250
for i := 51 to 200 do
ImageEnView1.CloneTool.AddToCloning( i, 250 ); // Add destinations to 200,250
ImageEnView1.CloneTool.EndCloning(); // Enact the changes
// This is the same as using:
ImageEnView1.CloneTool.SourcePoint := Point( 50, 50 ); // Source is 50,50
ImageEnView1.CloneTool.StartCloning( 50, 250 ); // Start cloning at 50,250
for i := 51 to 200 do
ImageEnView1.CloneTool.AddToCloning( i, 250 ); // Add destinations to 200,250
ImageEnView1.CloneTool.EndCloning(); // Enact the changes