ImageEn, unit iexUserInteractions

TIERetouchToolInteraction.StartPainting

TIERetouchToolInteraction.StartPainting


Declaration

function StartPainting(BmpX, BmpY: Integer): TRect;


Description

Start a programmatic painting operation.
Result is the area that was painted (in screen coordinates).

Normally, painting 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