ImageEn, unit imageenview |
|
TImageEnView.OnDrawLayerGrip
Declaration
property OnDrawLayerGrip: TIEDrawLayerGrip;
Description
Occurs when a layer grip is painted. If you handle this event the default behavior is disabled.
ABitmap is the destination bitmap and LayerIndex is the layer we are drawing.
Grip is in the range 0-9 as follows:
Value | Description |
0 | Left-top |
1 | Right-top |
2 | Right-bottom |
3 | Left-bottom |
4 | Left side |
5 | Right side |
6 | Top side |
7 | Bottom side |
8 | Rotation center grip |
9 | Rotation grip (grip that appears below the layer for easy rotation) |
Rect specifies the actual grip rectangle.
See the LayerEditing\Layers demo for more details.
Example
procedure Tfmain.ImageEnView1DrawLayerGrip(Sender: TObject;
ABitmap: TBitmap; layer, grip: Integer; rect: TRect);
begin
with ABitmap.Canvas do
begin
Pen.Style := psSolid;
Pen.Mode := pmCopy;
Pen.Color := clGreen;
Brush.Style := bsSolid;
Brush.Color := $0000FF00;
with rect do
Ellipse(Left-1, Top-1, Right+1, Bottom+1);
end;
end;