A question of transparent of SimpleGraph

Please discuss general Delphi programming topics here.

A question of transparent of SimpleGraph

Postby zjs316 » March 20th, 2009, 3:47 am

Dear Kambiz :
How are you? I am Chinese.I have a question want to ask you.The
SimpleGraph control achieve transparent ,the principle of transparency in
implementation is check the area of SimpleGraph where the parent window of
the picture at first, then copy the area to background of SimpleGraph
control. Why not directly through the windows settings, set background of
SimpleGraph control go transparent ? windows is how to form a transparent
style of implementation?How to implementation transparent style of Windows
Operating system?
My English is very poor,So I don't know whether I express clear.
Look forward to your reply.Thank you very much!
zjs316
Member
Member
 
Posts: 4
Joined: March 20th, 2009, 2:44 am

Re: A question of transparent of SimpleGraph

Postby Kambiz » March 20th, 2009, 3:26 pm

Hi,

The SimpleGraph control does not support transparency.

However, if you mean transparency of nodes, you can achieve it by setting node's brush style to bsClear or use one of mask pen styles.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2430
Joined: March 7th, 2003, 7:10 pm

Re: A question of transparent of SimpleGraph

Postby zjs316 » March 23rd, 2009, 1:12 am

Hi, Kambiz!
I mean transparency is background of the control is transparent . How implement real transparent background of the SimpleGraph?
Thank you very much!
zjs316
Member
Member
 
Posts: 4
Joined: March 20th, 2009, 2:44 am

Re: A question of transparent of SimpleGraph

Postby Kambiz » March 23rd, 2009, 10:03 am

I don't how to achieve that real transparency.

If you have static controls behind the SimpleGraph control, you can have transparency by setting Transparent property to True. But if any background controls changes, you have to invalidate SimpleGraph control.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2430
Joined: March 7th, 2003, 7:10 pm

Re: A question of transparent of SimpleGraph

Postby zjs316 » March 24th, 2009, 2:00 am

Kambiz,thank you very much!
I think I can't express my question mean because my bad English.
I kown achieve transparent of background of SimpleGraph by read your source code,the principle of transparent is copy the SimpleGraph 's parent control 's bitmap to meoDC ,then copy the parent image to background of SimpleGraph .
zjs316
Member
Member
 
Posts: 4
Joined: March 20th, 2009, 2:44 am

Re: A question of transparent of SimpleGraph

Postby zjs316 » March 24th, 2009, 2:14 am

Now ,I Rewrite the WMPaint function ,I conceal the CopyParentImage function ,then use PaintWindow API function .but have to invalidate background control to invalidate simplegraph 's background
zjs316
Member
Member
 
Posts: 4
Joined: March 20th, 2009, 2:44 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron