Board index » cppbuilder » Copy Stretch

Copy Stretch


2005-05-07 01:42:16 AM
cppbuilder90
What's the most direct way to copy a given rectangular
region of one bitmap into a given rectangular region of
another? The two rectangles may have different sizes and
aspect ratios, so shrinking and stretching in both
horizontal and vertical directions is needed.
 
 

Re:Copy Stretch

"C. Bond" < XXXX@XXXXX.COM >wrote in message
Quote
What's the most direct way to copy a given rectangular
region of one bitmap into a given rectangular region of
another?
VCL - TCanvas::CopyRect()
Win32 API - StretchBlt()
Gambit
 

Re:Copy Stretch

C. Bond wrote:
Quote
What's the most direct way to copy a given rectangular
region of one bitmap into a given rectangular region of
another? The two rectangles may have different sizes and
aspect ratios, so shrinking and stretching in both
horizontal and vertical directions is needed.

--
Democracy: The triumph of popularity over principle.
--
www.crbond.com


I do it with streching the biggest one(asp.ratio) and copying to
another one which is smallest.
 

{smallsort}

Re:Copy Stretch

Ercan MUTLU wrote:
Quote
C. Bond wrote:
>What's the most direct way to copy a given rectangular
>region of one bitmap into a given rectangular region of
>another? The two rectangles may have different sizes and
>aspect ratios, so shrinking and stretching in both
>horizontal and vertical directions is needed.
>
I do it with streching the biggest one(asp.ratio) and copying to
another one which is smallest.
If it wouldn't be too much trouble, could you post an example? I'm
currently using an auxiliary (intermediate) bitmap, but I think that
may be unnecessary. Again, I want to take a rectangular region from
one bitmap and copy it to a rectangular region of another bitmap
where the two regions have different dimensions.