Board index » cppbuilder » Copy a region of the canvas to a bitmap

Copy a region of the canvas to a bitmap


2006-07-01 06:09:58 AM
cppbuilder62
Hi,
I need to a region of the canvas to a bitmap
Does any one know this function in C++Builder?
Thanks!
Carlos Zapata
 
 

Re:Copy a region of the canvas to a bitmap

"Elico ltda" < XXXX@XXXXX.COM >wrote in message
Quote
I need to a region of the canvas to a bitmap
Please provide more details.
Gambit
 

Re:Copy a region of the canvas to a bitmap

Elico ltda wrote:
Quote
I need to a region of the canvas to a bitmap
Look at the Win32 API function BitBlt().
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
 

{smallsort}

Re:Copy a region of the canvas to a bitmap

"Elico ltda" < XXXX@XXXXX.COM >wrote:
Quote


I need to a region of the canvas to a bitmap

Does any one know this function in C++Builder?
For a VCL solution, use TCanvas::CopyRect. Otherwise
use a win32 api as Michel suggested.
~ JD
 

Re:Copy a region of the canvas to a bitmap

JD wrote:
Quote
For a VCL solution, use TCanvas::CopyRect.
Indeed, that's a possibility but you must be aware that
TCanvas::CopyRect() uses StretchBlt() which compress the source to fit
the dimensions of the destination rectangle.
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
 

Re:Copy a region of the canvas to a bitmap

"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >escribi?en el mensaje
Quote

"Elico ltda" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>I need to a region of the canvas to a bitmap

Please provide more details.


Gambit


Hi
Im developed a software in C++Builder 6.0 and I want to copy a region of
the canvas to a bitmap.
I have using the function CopyRect(), but copies part of an image from
another canvas into the canvas.
I need to copy a region of the canvas to a bitmap (temporary memory), put a
new image in this region of the canvas and in other event return the stored
bitmap to the initial region.
Could you send me some example.
Thanks for advanced.
Carlos Z.
 

Re:Copy a region of the canvas to a bitmap

"Elico ltda" < XXXX@XXXXX.COM >wrote in message
Quote
Im developed a software in C++Builder 6.0 and I want to
copy a region of the canvas to a bitmap.
You need to be more careful with the word "region". That has a specific
meaning in Win32 API programming. What you describe does not sound like an
actual "region" at all. Are you trying to copy a rectagular area of the
image, or an irregularly-shaped area? It makes a difference.
Quote
I have using the function CopyRect(), but copies part of an
image from another canvas into the canvas.
TBitmap has its own Canvas that you can copy to/from.
Gambit