ImageEn, unit iegdiplus

TIECanvas.DrawRects

TIECanvas.DrawRects


Declaration

procedure DrawRects(Rects: TList; LineColor: TColor = clNone; LineWidth: Integer = -1; Ellipses: Boolean = False; BrushStyle: TBrushStyle = bsClear); overload;
procedure DrawRects(Rects: TIEVisionVectorRect; LineColor: TColor = clNone; LineWidth: Integer = -1; Ellipses: Boolean = False; BrushStyle: TBrushStyle = bsClear); overload;
procedure DrawRects(KeyPoints: TIEVisionVectorKeyPoint; LineColor: TColor = clNone; LineWidth: Integer = -1; Ellipses: Boolean = False; BrushStyle: TBrushStyle = bsClear); overload;


Description

Draw a list of rects to the canvas as boxes or ellipses.

Rects can be one of:
- A TList of TRects, e.g. from SeparateObjects
- A TIEVisionVectorRect object, e.g. from IEVision methods such as createVectorRect, getRegions, detectObjects, etc.
- A TIEVisionVectorKeyPoint object, e.g. from IEVision methods such as detect

You can optionally specify a line color and width (if you have not specified using Pen.


Example

objRects := ImageEnView1.Proc.SeparateObjects( 4, True, 10 );
ImageEnView1.IEBitmap.IECanvas.DrawRects( RectsList, clRed, 2 );
ImageEnView1.Update();
for i := 0 to objRects.Count - 1 do
  dispose( PRect( objRects[i] ));
objRects.free();