Board index » cppbuilder » Strange behavior when using BitBlt + transparent

Strange behavior when using BitBlt + transparent


2004-02-22 06:39:59 PM
cppbuilder33
Hi,
I have 2 images on form, Image1 and Image2 and i'm using BitBlt
to copy piece from Image2 to Image1.
When Image1 (the destination image) is NOT transparent then
everything is OK, and after the copy i can see the piece from
Image2 on Image1, but if i change Image1 to:
Transparent = true
then when i use the BitBlt to do the copy i can see image2 parts
only on the Image1 parts which their color was not transparent
color! all the parts in Image1 which where transparent stay as
they are and i don't see Image2 pattern on them!
I hope that you understood what i mean, why does it happen?
By the way if at this point (after the copy) i change Image1 in
runtime back to
transparent = false
then suddenly i see all Image2 piece on Image1 as it should be!
Thanks,
Ramy.
 
 

Re:Strange behavior when using BitBlt + transparent

Ramy,
Just a suggestion. In your previous post I saw you were referencing
TImage->Canvas directly.
Does it work when you use TImage->Picture->Bitmap->Canvas?
Greetings,
Ronald
"Ramy" < XXXX@XXXXX.COM >schreef in bericht
Quote

Hi,

I have 2 images on form, Image1 and Image2 and i'm using BitBlt
to copy piece from Image2 to Image1.

When Image1 (the destination image) is NOT transparent then
everything is OK, and after the copy i can see the piece from
Image2 on Image1, but if i change Image1 to:

Transparent = true

then when i use the BitBlt to do the copy i can see image2 parts
only on the Image1 parts which their color was not transparent
color! all the parts in Image1 which where transparent stay as
they are and i don't see Image2 pattern on them!

I hope that you understood what i mean, why does it happen?

By the way if at this point (after the copy) i change Image1 in
runtime back to

transparent = false

then suddenly i see all Image2 piece on Image1 as it should be!

Thanks,
Ramy.

 

Re:Strange behavior when using BitBlt + transparent

Sorry but i already lost this code... sorry.
"Ronald Loonstra" < XXXX@XXXXX.COM >wrote:
Quote
Ramy,

Just a suggestion. In your previous post I saw you were referencing
TImage->Canvas directly.
Does it work when you use TImage->Picture->Bitmap->Canvas?

Greetings,
Ronald

"Ramy" < XXXX@XXXXX.COM >schreef in bericht
news:403886ff$ XXXX@XXXXX.COM ...
>
>Hi,
>
>I have 2 images on form, Image1 and Image2 and i'm using BitBlt
>to copy piece from Image2 to Image1.
>
>When Image1 (the destination image) is NOT transparent then
>everything is OK, and after the copy i can see the piece from
>Image2 on Image1, but if i change Image1 to:
>
>Transparent = true
>
>then when i use the BitBlt to do the copy i can see image2 parts
>only on the Image1 parts which their color was not transparent
>color! all the parts in Image1 which where transparent stay as
>they are and i don't see Image2 pattern on them!
>
>I hope that you understood what i mean, why does it happen?
>
>By the way if at this point (after the copy) i change Image1 in
>runtime back to
>
>transparent = false
>
>then suddenly i see all Image2 piece on Image1 as it should be!
>
>Thanks,
>Ramy.
 

{smallsort}