ImageEn, unit ievision

IEVisionRectToTRect


Declaration

function IEVisionRectToTRect(Rect: TIEVisionRect): TRect;


Description

Convert a TIEVisionRect to VCL TRect record.


Example

// Draw a red box onto bitmap around an IEVision rectangle
with ImageEnView1.IEBitmap.Canvas do
begin
  Pen.Color := clRed;
  Pen.Width := 8;
  Brush.Style := bsClear;
  Rectangle(IEVisionRectToTRect(ievrect));
  Font.Height := 36;
  Font.Color := clRed;
  Brush.Style := bsSolid;
  Brush.Color := clWhite;
  TextOut(rect.x + 4, rect.y + 4, 'Result');
end;

// Add a layer at the position of an IEVision rectangle
ImageEnView1.LayersAdd( ielkText, IEVisionRectToTRect( ievrect ));
with TIETextLayer( ImageEnView1.CurrentLayer ) do
begin
  BorderColor  := clRed;
  BorderWidth  := 5;
  FillColor    := clWhite;
  Opacity      := 0.66;
  Font.Height  := 24;
  Font.Color   := clRed;
  WordWrap     := False;
  Alignment    := iejCenter;
  Text         := 'Result';
  TextOverflow := ieoShrink;
end;


See Also

 IEVisionRect