ImageEn, unit imageenview |
|
TImageEnView.CopyToPolygon
Declaration
procedure CopyToPolygon(Dest: TBitmap; const Polygon: array of TPoint; PolygonLen: Integer; const Position: TPoint);
Description
Copies a region (Polygon) of current image inside Dest bitmap.
Polygon is an array of TPoint (pixel coordinates related to Dest bitmap) and PolygonLen is the number of point in Polygon.
Position is the source point (pixel coordinate related to current image). The source point is the top-left side of the rectangle that encloses destination polygon.
CopyToPolygon enlarges destination bitmap when needed.
// Copies current selection to ImageEnView2. Then enhance contrast of ImageEnView2 and copy back to ImageEnView1 (in same selection).
ImageEnView2.CopyFromPolygon(ImageEnView1.IEBitmap.VclBitmap, ImageEnView2.PolySelPoints^, ImageEnView2.PolySelCount, Point(0, 0));
ImageEnView2.Proc.Contrast(30);
ImageEnView2.CopyToPolygon(ImageEnView1.IEBitmap.VclBitmap, ImageEnView1.PolySelPoints^, ImageEnView1.PolySelCount, Point(0, 0));
ImageEnView1.Update();