ImageEn, unit iexUserInteractions |
|
TIEBrushToolInteraction.StartPainting
Declaration
function StartPainting(BmpX, BmpY: Integer): TRect;
Description
Start a programmatic painting operation (i.e. to mimic a user painting operation with your own code).
Result is the area that was painted (in screen coordinates).
Normally, painting operations are performed by the user via
miBrushTool, but it can be performed with code using:
1. Set the
size and
color of the brush
2. Start painting using
StartPainting
3. Add extra points to the painting operation using
AddToPainting (Optional)
4. Enact the painting changes using
EndPainting
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
// Paint a red line
ImageEnView1.BrushTool.BrushColor := clRed;
ImageEnView1.BrushTool.BrushSize := 50;
ImageEnView1.BrushTool.StartPainting( 50, 250 ); // Start at 50,250
ImageEnView1.BrushTool.AddToPainting( 200, 250 ); // Paint to 200,250
ImageEnView1.BrushTool.AddToPainting( 200, 450 ); // Paint to 200,450
ImageEnView1.BrushTool.EndPainting(); // Enact the changes