It is currently Tue May 21, 2013 9:33 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Any gadget allowing transparent background?
PostPosted: Thu Apr 12, 2012 7:26 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 578
Location: germany
Hello,

I want to make some custom gadgets, but using ImageGadget() does not allow me to make parts transparent. For example, if there is a disabled ImageGadget in the Background, I want my custom gadgets to have transparent areas which are showing the background image. Imagine a custom button gadget with round button shape. I need transparent corners. Also, it needs to be plattform independent (Win, Lin, Mac).

More and more customers want me to make skinned form and set the window background to be a inconspicuous texture (image). I can use a disabled ImageGadget() as background (which works fine so far), but I can no longer use TextGadget() etc. because of the missing transparent background. And I'm stuck in doing my own cross plattform custom gadgets if I can not have transparency in any gadget. The benefit of using an existing gadget would be the standard event handling which I prefer.

Is there a cross plattform way to make ImageGadget() or CanvasGadget() transparent? Or any other gadget type?

Kukulkan

_________________
When somebody says "Expect the unexpected" slap them in the face and say" You didn’t expect that, did you?"


Top
 Profile  
 
 Post subject: Re: Any gadget allowing transparent background?
PostPosted: Thu Apr 12, 2012 7:46 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 2485
Location: New Zealand
on windows you should be able to use regions on a gadget and linux by using pixbufs perhaps
http://www.gtk.org/api/2.6/gdk/gdk-Pixbufs.html


Top
 Profile  
 
 Post subject: Re: Any gadget allowing transparent background?
PostPosted: Fri Apr 13, 2012 6:57 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 578
Location: germany
Hello idle,

Quote:
on windows you should be able to use regions on a gadget

You mean to use regions to draw the gadget on? Is that allowing me alpha channel to underlying gadgets? As far as I know, this is only for shapes (but not allowing me to do a real shaddow by using alpha channel). Or am I wrong?

Quote:
linux by using pixbufs

If I read documents about pixbufs, it sounds like a canvas area to me. Maybe the same like the Canvas Gadget? Is that allowing me alpha channel to underlying gadgets?

Is someone having some good examples for using pixbufs in PureBasic?

Thanks,

Kukulkan

_________________
When somebody says "Expect the unexpected" slap them in the face and say" You didn’t expect that, did you?"


Top
 Profile  
 
 Post subject: Re: Any gadget allowing transparent background?
PostPosted: Sat Apr 14, 2012 12:01 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 2485
Location: New Zealand
I guess for cross platform it'd be easier to use an image gadget and fake the alpha transparency by a mask image and combining the background
the problem then is how to get the background of the window.


Top
 Profile  
 
 Post subject: Re: Any gadget allowing transparent background?
PostPosted: Sat Apr 14, 2012 12:54 am 
Online
Addict
Addict

Joined: Fri Oct 23, 2009 2:33 am
Posts: 2853
Location: Wales, UK
Using the Canvas gadget to draw your own gadgets could be the answer. There are already a few gadgets coded on the forum, here is one:

http://www.purebasic.fr/english/viewtopic.php?f=5&t=48784

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye