ImageEn, unit iexUserInteractions

TIECloneToolInteraction.SourceOffset

TIECloneToolInteraction.SourceOffset


Declaration

property SourceOffset: TPoint;


Description

Once the user has clicked both the clone source and the clone destination, SourceOffset returns the offset between source and destination positions (negative values mean the source is left or above the destination. Postive values mean the source is right or below the destination).


Example

// 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


See Also

- SourcePoint
- SourceSelected
- Cancel