Declarationfunction StartPainting(BmpX, BmpY: Integer): TRect;
Start a programmatic painting operation.
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
of the brush
2. Start painting using StartPainting
3. Add extra points to the painting operation using AddToPainting
4. Enact the painting changes using EndPainting
Example// Paint a red line of content from 200 pixels above
ImageEnView1.BrushTool.BrushColor := clRed;
ImageEnView1.BrushTool.StartPainting( 50, 250 ); // Start at 50,250
for i := 51 to 200 do
ImageEnView1.BrushTool.AddToPainting( i, 250 ); // Add destinations to 200,250
ImageEnView1.BrushTool.EndPainting(); // Enact the changes