ImageEn, unit imageenproc |
|
TImageEnProc.PaintPenMarker
Declaration
procedure PaintPenMarker(x, y: Integer; Width: Integer = 20; Color: TColor = clYellow; BackgroundColor: TColor = clWhite; Tolerance: Integer = 10);
Description
Emulates a pen marker (circle) over the image.
Note:
◼Image must be true color
◼Pointer will only be drawn if the image color at each draw point is the same color as
BackgroundColor (within the allowed
Tolerance)
Parameter | Description |
x and y | Position of the pen in bitmap coordinates |
Width | The size of the circle |
BackgroundColor | The background color to change |
Color | The color that replaces BackgroundColor |
Tolerance | The maximum difference from BackgroundColor to allow drawing the marker |
Note:
◼PaintPenMarker doesn't save to the
Undo stack
◼If the image
PixelFormat is not ie24RGB, it will be converted
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
// Draw a pointer over an image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );
(where background is close to white)
ImageEnView1.Proc.PaintPenMarker( ImageEnView1.IEBitmap.Width div 5,
ImageEnView1.IEBitmap.Height div 8,
30,
clRed, clWhite, PaintPenMarker_Background_Tolerance );
// Force drawing of pointer
ImageEnView1.Proc.PaintPenMarker( ImageEnView1.IEBitmap.Width div 2,
ImageEnView1.IEBitmap.Height div 2,
20, clRed, clWhite, MAXINT );