From: Armel on
"Vadim Zeitlin" <vadim(a)wxwidgets.org> a �crit dans le message de news:
mailman.6.1209825866.27688.wx-users(a)lists.wxwidgets.org...
> On Fri, 2 May 2008 19:06:24 +0200 Armel <armelasselin(a)hotmail.com> wrote:
>
> A> [with latest wx on Win/Mac/GTK]
> A> I'd like to draw a filled rectangle with transparency. Is there a
> function
> A> to do that?
>
> wxGraphicsContext should handle this (although I didn't try it myself).
could you be more specific ? I found nothing related to alpha in trunk in
wx/graphics.h (apart from a #if 0 "Set/GetAlpha" functions pair).

Best regards
Armel


From: Robin Dunn on
Vadim Zeitlin wrote:
> On Mon, 5 May 2008 08:11:03 +0200 Armel <armelasselin(a)hotmail.com> wrote:
>
> A> > wxGraphicsContext should handle this (although I didn't try it myself).
> A> could you be more specific ? I found nothing related to alpha in trunk in
> A> wx/graphics.h (apart from a #if 0 "Set/GetAlpha" functions pair).
>
> As I said, I didn't test it but normally you should just create a
> wxGraphicsBrush using a colour with alpha component and painting with it
> should work as expected.

You can also use wxGCDC (wxDC API using wxGraphicsContext underneath)
and set the alpha component in the wxColor objects you pass to wxPen or
wxBrush.

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

From: Armel on

"Robin Dunn" <robin(a)alldunn.com> a �crit dans le message de news:
mailman.18.1210005791.27688.wx-users(a)lists.wxwidgets.org...
> Vadim Zeitlin wrote:
>> On Mon, 5 May 2008 08:11:03 +0200 Armel <armelasselin(a)hotmail.com> wrote:
>>
>> A> > wxGraphicsContext should handle this (although I didn't try it
>> myself).
>> A> could you be more specific ? I found nothing related to alpha in trunk
>> in A> wx/graphics.h (apart from a #if 0 "Set/GetAlpha" functions pair).
>>
>> As I said, I didn't test it but normally you should just create a
>> wxGraphicsBrush using a colour with alpha component and painting with it
>> should work as expected.
>
> You can also use wxGCDC (wxDC API using wxGraphicsContext underneath) and
> set the alpha component in the wxColor objects you pass to wxPen or
> wxBrush.
do I need the very latest 2.9.x or 2.8.7 would be enough?

Best regards
Armel


From: Robin Dunn on
Armel wrote:
> "Robin Dunn" <robin(a)alldunn.com> a �crit dans le message de news:
> mailman.18.1210005791.27688.wx-users(a)lists.wxwidgets.org...
>> Vadim Zeitlin wrote:
>>> On Mon, 5 May 2008 08:11:03 +0200 Armel <armelasselin(a)hotmail.com> wrote:
>>>
>>> A> > wxGraphicsContext should handle this (although I didn't try it
>>> myself).
>>> A> could you be more specific ? I found nothing related to alpha in trunk
>>> in A> wx/graphics.h (apart from a #if 0 "Set/GetAlpha" functions pair).
>>>
>>> As I said, I didn't test it but normally you should just create a
>>> wxGraphicsBrush using a colour with alpha component and painting with it
>>> should work as expected.
>> You can also use wxGCDC (wxDC API using wxGraphicsContext underneath) and
>> set the alpha component in the wxColor objects you pass to wxPen or
>> wxBrush.
> do I need the very latest 2.9.x or 2.8.7 would be enough?

It will work in the 2.8.7 release.

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

From: Armel on

"Robin Dunn" <robin(a)alldunn.com> a �crit dans le message de news:
mailman.19.1210011978.27688.wx-users(a)lists.wxwidgets.org...
> Armel wrote:
>> "Robin Dunn" <robin(a)alldunn.com> a �crit dans le message de news:
>> mailman.18.1210005791.27688.wx-users(a)lists.wxwidgets.org...
>>> Vadim Zeitlin wrote:
>>>> On Mon, 5 May 2008 08:11:03 +0200 Armel <armelasselin(a)hotmail.com>
>>>> wrote:
>>>>
>>>> A> > wxGraphicsContext should handle this (although I didn't try it
>>>> myself).
>>>> A> could you be more specific ? I found nothing related to alpha in
>>>> trunk in A> wx/graphics.h (apart from a #if 0 "Set/GetAlpha" functions
>>>> pair).
>>>>
>>>> As I said, I didn't test it but normally you should just create a
>>>> wxGraphicsBrush using a colour with alpha component and painting with
>>>> it
>>>> should work as expected.
>>> You can also use wxGCDC (wxDC API using wxGraphicsContext underneath)
>>> and set the alpha component in the wxColor objects you pass to wxPen or
>>> wxBrush.
>> do I need the very latest 2.9.x or 2.8.7 would be enough?
>
> It will work in the 2.8.7 release.

thank you all :-)

Armel