| View previous topic :: View next topic |
| Author |
Message |
C. Bond Guest
|
Posted: Fri May 06, 2005 5:42 pm Post subject: Copy Stretch |
|
|
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.
--
http://www.crbond.com
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri May 06, 2005 7:18 pm Post subject: Re: Copy Stretch |
|
|
"C. Bond" <cbond (AT) ix (DOT) netcom.com> wrote
| 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
|
|
| Back to top |
|
 |
Ercan MUTLU Guest
|
Posted: Sun May 08, 2005 2:33 pm Post subject: 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.
--
http://www.crbond.com
I do it with streching the biggest one(asp.ratio) and copying to |
another one which is smallest.
|
|
| Back to top |
|
 |
C. Bond Guest
|
Posted: Sun May 08, 2005 3:22 pm Post subject: 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.
--
There are two things you must never attempt to prove: the unprovable
-- and the obvious.
--
Democracy: The triumph of popularity over principle.
--
http://www.crbond.com
|
|
| Back to top |
|
 |
|