BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange behavior when using BitBlt + transparent

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
Ramy
Guest





PostPosted: Sun Feb 22, 2004 10:39 am    Post subject: Strange behavior when using BitBlt + transparent Reply with 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.

Back to top
Ronald Loonstra
Guest





PostPosted: Sun Feb 22, 2004 11:42 pm    Post subject: Re: Strange behavior when using BitBlt + transparent Reply with 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" <No (AT) mail (DOT) dot.com> schreef in bericht
news:403886ff$1 (AT) newsgroups (DOT) borland.com...
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.




Back to top
Ramy
Guest





PostPosted: Mon Feb 23, 2004 7:33 am    Post subject: Re: Strange behavior when using BitBlt + transparent Reply with quote




Sorry but i already lost this code... sorry.

"Ronald Loonstra" <r.loonstra (AT) home (DOT) nl> 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" <No (AT) mail (DOT) dot.com> schreef in bericht
news:403886ff$1 (AT) newsgroups (DOT) borland.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.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.