ImageEn, unit iexUserInteractions

TIECloneToolInteraction.SourcePoint

TIECloneToolInteraction.SourcePoint


Declaration

property SourcePoint: TPoint;


Description

Returns the pixel that the user clicked as a source for cloning (position within the bitmap). It is only valid if SourceSelected = True. If you set a source point, the user will not need to select it and instead the next click will commence cloning.

Note: Specifying a value for SourcePoint will set SourceSelected to true.


Example

// Set SourcePoint to 100,100. User can click to clone from this point
ImageEnView1.CloneTool.SourcePoint := Point( 100, 100 );

// Clone an area of the image from 200 pixels above
ImageEnView1.CloneTool.SourcePoint := Point( 50, 50 );       // Source is 50,50
ImageEnView1.CloneTool.StartCloning( 50, 250 );              // Start at 50,250
ImageEnView1.CloneTool.AddToCloning( 200, 250 );             // Clone to 200,250
ImageEnView1.CloneTool.AddToCloning( 200, 450 );             // Clone to 200,450
ImageEnView1.CloneTool.EndCloning();                         // Enact the changes

// This is the same as using:
ImageEnView1.CloneTool.SourceOffset := Point( 0, -200 );     // Set source as 200 pixels above the destination
ImageEnView1.CloneTool.StartCloning( 50, 250 );              // Start at 50,250
ImageEnView1.CloneTool.AddToCloning( 200, 250 );             // Clone to 200,250
ImageEnView1.CloneTool.AddToCloning( 200, 450 );             // Clone to 200,450
ImageEnView1.CloneTool.EndCloning();                         // Enact the changes


See Also

 SourceSelected
 Cancel