Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Toolbar button alpha channel problem in matplotlib
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Werner F. Bruhin  
View profile  
 More options Jun 9 2005, 5:01 am
From: "Werner F. Bruhin" <werner.bru...@free.fr>
Date: Thu, 09 Jun 2005 11:01:18 +0200
Local: Thurs, Jun 9 2005 5:01 am
Subject: Toolbar button alpha channel problem in matplotlib

The matplotlib 0.81 version disables buttons on the toolbar which are
not usable at the time.

Doing this shows a black square instead of applying the alpha channel
(correct terminology?).

To ensure that the icon file actually is o.k. I created a toolbar with
the icon in question and it shows correctly as a black and white version
when it is in-active and a colored version when it is active.

Matplotlib uses "AddSimpleTool" to create the tools, so I tried
"AddLabelTool" and "DoAddTool".  With the later two calls the image is
now in color if active or in-active - still not showing the black and
white version.

Here some code snippets:
        self.AddLabelTool(label = 'Back',
                bitmap = _load_bitmap2('back.png'),
                bmpDisabled = wx.NullBitmap,
                id = self._NTB2_BACK,
                longHelp = '',
                shortHelp = '')

_load_bitmap2 is just checking that the image exists and returns a
wx.Bitmap instance.

The attached "toolbartest.png" shows what we like to see and the
"matplottoolbar.png" shows the back button in color using the
"AddLabelTool" and the grey square is for the forward button which uses
"AddSimpleTool".

Any hints on how to fix this would be very welcome.

See you
Werner

  matplottoolbar.png
4K Download

  toolbartest.png
2K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Dunn  
View profile  
 More options Jun 9 2005, 2:05 pm
From: Robin Dunn <ro...@alldunn.com>
Date: Thu, 09 Jun 2005 11:05:35 -0700
Local: Thurs, Jun 9 2005 2:05 pm
Subject: Re: [wxPython-users] Toolbar button alpha channel problem in matplotlib

Werner F. Bruhin wrote:
> The attached "toolbartest.png" shows what we like to see and the
> "matplottoolbar.png" shows the back button in color using the
> "AddLabelTool" and the grey square is for the forward button which uses
> "AddSimpleTool".

> Any hints on how to fix this would be very welcome.

Both AddSimpleTool and AddLabelTool call DoAddTool, so there  must be
some other difference between the two cases.  What is the platform and
version?  Can you send a small sample (including the images) that shows
the problem?

--
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Werner F. Bruhin  
View profile  
 More options Jun 10 2005, 10:29 am
From: "Werner F. Bruhin" <werner.bru...@free.fr>
Date: Fri, 10 Jun 2005 16:29:46 +0200
Local: Fri, Jun 10 2005 10:29 am
Subject: Re: [wxPython-users] Toolbar button alpha channel problem in matplotlib
Hi Robin,

The mystery of the color or grey square button is me forgetting what I
am doing!

The grey square is the due to matplotlib using "xpm" file format and
wxPython only supports alpha channel with "png" file format, according
to the documentation.

However I still can't figure out why the color version is shown (when
using "png" files) when the tool button is disabled, it should show the
grey & white version.

Had no success in creating a small test program showing the problem,
will have another go at it next week.

See you
Werner


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Werner F. Bruhin  
View profile  
 More options Jun 10 2005, 3:37 am
From: "Werner F. Bruhin" <werner.bru...@free.fr>
Date: Fri, 10 Jun 2005 09:37:55 +0200
Local: Fri, Jun 10 2005 3:37 am
Subject: Re: [wxPython-users] Toolbar button alpha channel problem in matplotlib

Hi Robin,

Robin Dunn wrote:
> Werner F. Bruhin wrote:

>> The attached "toolbartest.png" shows what we like to see and the
>> "matplottoolbar.png" shows the back button in color using the
>> "AddLabelTool" and the grey square is for the forward button which
>> uses "AddSimpleTool".

>> Any hints on how to fix this would be very welcome.

> Both AddSimpleTool and AddLabelTool call DoAddTool, so there  must be
> some other difference between the two cases.  What is the platform and
> version?  Can you send a small sample (including the images) that
> shows the problem?

I am running on Windows XP but I believe Andrea is seeing the same and
if I recall correctly she is on Windows XP.

Small sample with matplotlib (you would need to get the 0.8.1
version)?!  I only see the problem in matplotlib with the WXAgg, I can't
reproduce it in a small test program (at least not yet).

Just in case you have matplotlib try running wxcursor_demo (I attach it
in case you don't have the matplotlib example stuff).

See you
Werner

  wxcursor_demo.py
5K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Damoc  
View profile  
 More options Jun 10 2005, 4:09 am
From: "Peter Damoc" <pda...@gmx.net>
Date: Fri, 10 Jun 2005 11:09:03 +0300
Local: Fri, Jun 10 2005 4:09 am
Subject: Re: [wxPython-users] Toolbar button alpha channel problem in matplotlib
On Fri, 10 Jun 2005 10:37:55 +0300, Werner F. Bruhin  

dude :) she is a he :)
http://xoomer.virgilio.it/infinity77/
In Italy Andrea is a boy name ;)
honest mistake tho :) my future wife's name is Andreea. :)

Peter


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrea_gav...@tin.it  
View profile  
 More options Jun 10 2005, 4:57 am
From: andrea_gav...@tin.it
Date: Fri, 10 Jun 2005 10:57:12 +0200
Local: Fri, Jun 10 2005 4:57 am
Subject: Re: [wxPython-users] Toolbar button alpha channel problem in matplotlib

>> I am running on Windows XP but I believe Andrea is seeing the same and
>> if I recall correctly she is on Windows XP.

>dude :) she is a he :)
>http://xoomer.virgilio.it/infinity77/
>In Italy Andrea is a boy name ;)
>honest mistake tho :) my future wife's name is Andreea. :)

Hehehehehehe... it is normal, everywhere I go people keep saying "from your
name I was expecting a woman..."
No rpoblem for that ;-)
However, when I posted my first controls (like FoldPanelBar, HyperLinkCtrl,
ExtendedChoice and so on), I was somehow impressed by the number of nice
replies/comments I got. Did the "he/she" confusion influenced your suggestions/comments?
;-)))))

Andrea.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Franz Steinhäusler  
View profile  
 More options Jun 10 2005, 5:08 am
From: Franz Steinhäusler <franz.steinhaeus...@gmx.at>
Date: Fri, 10 Jun 2005 11:08:11 +0200
Local: Fri, Jun 10 2005 5:08 am
Subject: Re: Toolbar button alpha channel problem in matplotlib

Hello Andrea,

in your first posts, I wasn't really sure.
You could be a "she" or "he", but that should make no difference.

At the same time I remembered a former Formula One driver
"Andrea de Cesaris".

In german "Andrea" is a woman forename (not sure, how it is in english)
in oppostition to Andreas.
But more often, woman forenames are longer than the man counterparts.

man    -> woman

Franz  -> Franziska
Martin -> Martina
Stefan -> Stefanie
Daniel -> Daniela

--
Franz Steinhaeusler


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Werner F. Bruhin  
View profile  
 More options Jun 10 2005, 6:19 am
From: "Werner F. Bruhin" <werner.bru...@free.fr>
Date: Fri, 10 Jun 2005 12:19:03 +0200
Local: Fri, Jun 10 2005 6:19 am
Subject: Re: [wxPython-users] Toolbar button alpha channel problem in matplotlib
Hi Andrea,

Absolutely :-D

Being Swiss I should not have missed that one :-[ , hope you'll forgive me!

Coming back to this toolbar issue, created a small test program to try
to imitate the stuff matplotlib does with the toolbar but on my system
(XP) it works like a charm, but within matplotlib I still get this damn
grey squares.

It is obviously way above my head!

See you
Werner


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Damoc  
View profile  
 More options Jun 10 2005, 9:35 am
From: "Peter Damoc" <pda...@gmx.net>
Date: Fri, 10 Jun 2005 16:35:14 +0300
Local: Fri, Jun 10 2005 9:35 am
Subject: Re: [wxPython-users] Re: Toolbar button alpha channel problem in matplotlib
On Fri, 10 Jun 2005 16:23:18 +0300, the_shelter <pdf...@the-shelter.de>  
wrote:

> Just to make the she/he subject complete:
> Andrea stems from greek meaning 'man' ...
> Being a German myself, I wonder what language got confused ;)
> But seriously,
> with me affection only has me for the nice controls you have posted.
> Keep hanging in there! I really like them a lot!

well to make the subject complete you should have posted
this:
http://behindthename.com/nm/a3.html
or this...
http://behindthename.com/php/view.php?name=andrea-1

now let's face it... we all like Andrea for the widgets he brought to  
wxPython... but... it wouldn't have hurt to look a little bit like this:
http://devone.de/pics/linux_chick.jpg

:)

Peter.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
the_shelter  
View profile  
 More options Jun 10 2005, 9:23 am
From: the_shelter <pdf...@the-shelter.de>
Date: Fri, 10 Jun 2005 15:23:18 +0200
Local: Fri, Jun 10 2005 9:23 am
Subject: Re: [wxPython-users] Re: Toolbar button alpha channel problem in matplotlib
Just to make the she/he subject complete:
Andrea stems from greek meaning 'man' ...
Being a German myself, I wonder what language got confused ;)
But seriously,
with me affection only has me for the nice controls you have posted.
Keep hanging in there! I really like them a lot!

--
Best regards,
 the_shelter                            mailto:pdf...@the-shelter.de


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrea_gav...@tin.it  
View profile  
 More options Jun 10 2005, 12:14 pm
From: andrea_gav...@tin.it
Date: Fri, 10 Jun 2005 18:14:21 +0200
Local: Fri, Jun 10 2005 12:14 pm
Subject: Re: [wxPython-users] Toolbar button alpha channel problem in matplotlib

>now let's face it... we all like Andrea for the widgets he brought to
>wxPython... but... it wouldn't have hurt to look a little bit like this:
>http://devone.de/pics/linux_chick.jpg

Wow... what a nice programmer this chick ;-)
No luck for me, I have never met a Linux/Windows/Unix/Mac/Debian/Whatever
programmer like that... mhm, do I have to switch to another GUI tool to
find her? ;-)

Andrea.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Dunn  
View profile  
 More options Jun 10 2005, 2:07 pm
From: Robin Dunn <ro...@alldunn.com>
Date: Fri, 10 Jun 2005 11:07:41 -0700
Local: Fri, Jun 10 2005 2:07 pm
Subject: Re: [wxPython-users] Toolbar button alpha channel problem in matplotlib

Werner F. Bruhin wrote:
> Hi Robin,

> The mystery of the color or grey square button is me forgetting what I
> am doing!

> The grey square is the due to matplotlib using "xpm" file format and
> wxPython only supports alpha channel with "png" file format, according
> to the documentation.

XPM files do support a mask, or in other words a 1-bit alpha where each
pixel is either fully transparent or fully opaque, (so there is no
blending.)

> However I still can't figure out why the color version is shown (when
> using "png" files) when the tool button is disabled, it should show the
> grey & white version.

That I don't know...

--
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Franz Steinhäusler  
View profile  
 More options Jun 11 2005, 3:46 pm
From: Franz Steinhäusler <franz.steinhaeus...@gmx.at>
Date: Sat, 11 Jun 2005 21:46:34 +0200
Local: Sat, Jun 11 2005 3:46 pm
Subject: Re: Toolbar button alpha channel problem in matplotlib

Hello Peter,

thank you for this interesting site.

For me applies:

"
German form of Franciscus (see FRANCIS). This name was borne by the influential author Franz Kafka, writer of 'The Trial' and 'The
Castle' among other works.

Also, rulers of Austria and the Holy Roman Empire have had this name.
"

Wow, what honour ;)

--
Franz Steinhäusler

DrPython (Project Developer)
http://mitglied.lycos.de/drpython/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »