ImageEn, unit iexUserInteractions |
|
TIEBrushToolInteraction.AddToPainting
Declaration
function AddToPainting(BmpX, BmpY: Integer): TRect;
Description
Add extra destination points to 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 and
color of the brush
2. Start painting using
StartPainting3. Add extra points to the painting operation using
AddToPainting (Optional)
4. Enact the painting changes using
EndPaintingExample
// 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