Board index » delphi » BitBlt ... in Delphi vs VB

BitBlt ... in Delphi vs VB

New to Delphi . . .
can someone post a bit of code to show a BitBlt operation, like how do I
obtain the Handle ( trying to use BitBlt from two Bitmaps created in 2 Image
boxes . .), I've got this figured out in VB, but not Delphi
thanks in advance
cpm
 

Re:BitBlt ... in Delphi vs VB


The handle of a TBitmap is TBitmap.Handle.

--
* LT Nick Hodges, USN                     Naval Postgraduate School     *
* jnhod...@nps.navy.mil                Information Technology Management*
* CIS: 71563,2250 AOL: NHodges                   Monterey, CA           *
* The opinions expressed above are entirely my own and not the Navy's.  *

Re:BitBlt ... in Delphi vs VB


Quote
>   cmasg...@magnus.acs.ohio-state.edu (Cris Masgras) writes:
>  New to Delphi . . .
>  can someone post a bit of code to show a BitBlt operation, like how do I
>  obtain the Handle ( trying to use BitBlt from two Bitmaps created in 2 Image
>  boxes . .), I've got this figured out in VB, but not Delphi
>  thanks in advance
>  cpm

BitBlt(DestDC,xcenter,ycenter
           ,rect.right-rect.left,rect.bottom-rect.top,
           IMAGE1.Picture.bitmap.canvas.handle,0,0, SRCCOPY);
Quote

Re:BitBlt ... in Delphi vs VB


Quote
cmasg...@magnus.acs.ohio-state.edu (Cris Masgras) wrote:
>>New to Delphi . . .
>>can someone post a bit of code to show a BitBlt operation, like how do I
>>obtain the Handle ( trying to use BitBlt from two Bitmaps created in 2 Image
>>boxes . .), I've got this figured out in VB, but not Delphi
>>thanks in advance
>>cpm

Why not use the Canvas.CopyRect method. As far as I can tell it's just
as fast as BitBlt, and a lot friendlier. Of course this doesn't apply
if you're using WinG's BitBlt.

====================================================================
= Casey Charlton            = 'Actions speak louder than words,    =
= ca...@larouss.demon.co.uk =  grenades speak louder than actions' =
====================================================================

Re:BitBlt ... in Delphi vs VB


In article <cmasgras.36.30320...@magnus.acs.ohio-state.edu>,

Quote
Cris Masgras <cmasg...@magnus.acs.ohio-state.edu> wrote:
>New to Delphi . . .
>can someone post a bit of code to show a BitBlt operation, like how do I
>obtain the Handle ( trying to use BitBlt from two Bitmaps created in 2 Image
>boxes . .), I've got this figured out in VB, but not Delphi
>thanks in advance
>cpm

Earlier today I saw some sample code in the help
file.  There are answers to most riddles in that
file -- they're just not easy to locate!

Mike Leahy

Re:BitBlt ... in Delphi vs VB


Quote

>Why not use the Canvas.CopyRect method. As far as I can tell it's just
>as fast as BitBlt, and a lot friendlier. Of course this doesn't apply
>if you're using WinG's BitBlt.

Has anyone actually tried a serious test of the speed of copyrect vs.
BitBlt?  As far as I can tell, copyrect is just an incpsualted BitBlt,
but it would be neat to test the actual differnce in speed.  Maybe if I
get some free time I will do that and post results (if anyone
isinterested).

Travis
tmetc...@graphicmedia.com

Other Threads