ImageEn, unit iexUserInteractions

TIERetouchToolInteraction.EndPainting

TIERetouchToolInteraction.EndPainting

Declaration

function StartPainting(): TRect;

Description

Complete a programmatic retouch operation and enact the changes (i.e. to mimic a user retouch operation with your own code).
Result is the area that was painted (in screen coordinates).

Normally, retouch operations are performed by the user via miRetouchTool, but it can be performed with code using:
1. Start retouching using StartPainting
2. Add extra points to the retouching operation using AddToPainting (Optional)
3. Enact the retouching changes using EndPainting

Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr

Example

// Blur an area of the image
ImageEnView1.RetouchTool.RetouchMode := iermBlur;
ImageEnView1.RetouchTool.BrushSize   := 50;
ImageEnView1.RetouchTool.StartPainting( 50, 250 );              // Start at 50,250
ImageEnView1.RetouchTool.AddToPainting( 200, 250 );             // Blur to 200,250
ImageEnView1.RetouchTool.AddToPainting( 200, 450 );             // Blur to 200,450
ImageEnView1.RetouchTool.EndPainting();                         // Enact the changes