hello,
I'm trying to copy imageEnView VisibleBitmapRect to another ieBitmap
the problem is that nothing is copied to the dest.
what is my fault?
here is the snippet of my code
ipor is the name of my imageEnView
function copy_iebitmap_rect_2_iebitmap: boolean;
var iebmp: tieBitmap;
rect: TRect;
begin
iebmp := tiebitmap.Create;
rect.left := ipor.VisibleBitmapRect.Left;
rect.top := ipor.VisibleBitmapRect.Top;
rect.Right := ipor.VisibleBitmapRect.Right;
rect.Bottom := ipor.VisibleBitmapRect.Bottom;
rect.width := ipor.VisibleBitmapRect.Width;
rect.height := ipor.VisibleBitmapRect.Height;
// from IE Help:
// CopyRectTo(Dest: TIEBitmap; SrcX, SrcY, DstX, DstY: integer; RectWidth, RectHeight: integer; CopyAlpha: boolean = false);
iebmp.PixelFormat := ipor.ieBitmap.PixelFormat; // added to help but with no effect
ipor.ieBitmap.CopyRectTo(iebmp, // dest
rect.Left, rect.Top, // src = 605, 504
0, 0, // dest
rect.Width, rect.Height // = 801, 429
);
result := (iebmp.Width>0); // iebmp.Width = 0
end;
--
regards, Kowal