ImageEn, unit ievision

TIEVisionImage.copy

TIEVisionImage.copy


Declaration

procedure copy(dest: TIEVisionImage; mask: TIEVisionImage); overload; safecall;
procedure copy(dest: TIEVisionImage); overload; safecall;
procedure copy(const srcRect: TIEVisionRect; dest: TIEVisionImage); overload; safecall;
function copy(const srcRect: TIEVisionRect): TIEVisionImage; overload; safecall;
procedure copy(const srcRect: TIEVisionRect; const dstRect: TIEVisionRect; dest: TIEVisionImage); overload; safecall;
procedure copy(const srcRect: TIEVisionRect; destPtr: pointer; rowLen: int32_t); overload; safecall;


Description

Copies current image to the specified destination.

Parameter Description
dest The TIEVisionImage to copy from
mask A TIEVisionImage specifying which pixels to copy (pixels > 0 in the mask will be copied)
srcRect The area of this image to copy
dstRect The area where the copied image will be drawn
destPtr Copy to a buffer rather than an image
rowLen The row length for the buffer


Example

// overload nr.1: copies image1 to destination, using specified mask (only pixels with mask > 0)
destination := IEVisionLib.createImage();
image1.copy(destination, mask);

// overload nr.2: copies image1 to destination
destination := IEVisionLib.createImage();
image1.copy(destination);

// overload nr.3: copies specified rectangle of image1 to destination
destination := IEVisionLib.createImage();
image1.copy(IEVisionRect(10, 10, 200, 200), destination);

// overload nr.4: creates a new image from the specified rectangle
destination := image1.copy(IEVisionRect(10, 10, 200, 200));

// overload nr.5: copies specified rectangle of image1 to specified rectangle of destination
destination := IEVisionLib.createImage();
image1.copy(IEVisionRect(10, 10, 200, 200), IEVisionRect(50, 50, 200, 200), destination);

// overload nr.6: copies specified rectangle to destination buffer
image1.copy(IEVisionRect(10, 10, 200, 200), destPointer, destRowLen);