TRect
Declaration
TRect = record
Description
VCL record representing a rectangle:
◼Left: Integer;
◼Right: Integer;
◼Top: Integer;
◼Bottom: Integer;
Related ImageEn types:
TDRect,
TIERectangle,
TIEVisionRect.
See Also
◼VCL TRect Documentation
◼IERectangle
◼IERectangleToRect
◼IEVisionRect
◼IEVisionRectToTRect
Example
// Display the index over the layer
procedure TForm1.ImageEnView1DrawLayer(Sender: TObject; Dest: TIEBitmap; LayerIndex: Integer; LayerRect: TRect);
var
txtRect: TRect;
begin
txtRect := Rect( LayerRect.Left + 10, LayerRect.Top + 10, LayerRect.Left + 40, LayerRect.Top + 40 );
with Dest.Canvas do
begin
// Simple example: Would be better to center text in filled rect
Brush.Color := clBlue;
FillRect( aRect );
Font.Color := clWhite;
Font.Height := 12;
Font.Style := [fsBold];
TextRect( txtRect, LayerRect.Left + 20, LayerRect.Top + 20, IntToStr( LayerIndex ));
end;
end;