Board index » cppbuilder » VCL equal to getimage-putimage

VCL equal to getimage-putimage

I've been trying to figure out how to do the equivilent of getimage() &
putimage() (from borland BGI)  in the VCL.
Basically, I want to copy or move  a portion of the canvas from one
location to another. Doesn't have to be all that fast.

I figure its going to be based on copyrect or something but I cant
figure it out...any clues?

 

Re:VCL equal to getimage-putimage


I'm not exactly sure what getimage or putimage do, but here is how copyrect
works...

First specify a rect for what you would like to copy from your source canvas
and a rect for your dest canvas:

DestRect = Rect(50,50,100,100);

SourceRect = Rect(10,10,50, 50);

Next, use copyrect to copy your  rect from your source canvas, to your dest
canvas.

DestinationCanvas->CopyRect(DestRect, Source->Canvas, SourceRect);

If you want to move a rect from on just one canvas, just use
DestinationCanvas as your source as well.

Hope that helps....

Vesty.

Quote
"Jim Whiting" <jwhit...@intrex.net> wrote in message

news:3BBBC32E.EFB5B1D7@intrex.net...
Quote
> I've been trying to figure out how to do the equivilent of getimage() &
> putimage() (from borland BGI)  in the VCL.
> Basically, I want to copy or move  a portion of the canvas from one
> location to another. Doesn't have to be all that fast.

> I figure its going to be based on copyrect or something but I cant
> figure it out...any clues?

Other Threads