Discussion:
[eiffel_software] EV_PIXMAP with transparent background
Eric Bezault ericb@gobosoft.com [eiffel_software]
2015-08-03 11:54:34 UTC
Permalink
Hello,

Is there a way to programmatically create a pixmap
using EV_PIXMAP with a transparent background.
When I don't call `set_background_color', I get a
grey back ground. And I see no way to get an EV_COLOR
which would represent a transparent color.
--
Eric Bezault
mailto:***@gobosoft.com
http://www.gobosoft.com
Jocelyn Fiat jfiat@eiffel.com [eiffel_software]
2015-08-03 13:29:55 UTC
Permalink
I think only EV_PIXEL_BUFFER provides feature to edit and add transparency .

So the way to go would be
create the pixmap as an EV_PIXEL_BUFFER, and then use
{EV_PIXEL_BUFFER}.to_pixmap to get an EV_PIXMAP.

-- Jocelyn
Post by Eric Bezault ***@gobosoft.com [eiffel_software]
Hello,
Is there a way to programmatically create a pixmap
using EV_PIXMAP with a transparent background.
When I don't call `set_background_color', I get a
grey back ground. And I see no way to get an EV_COLOR
which would represent a transparent color.
--
Eric Bezault
http://www.gobosoft.com
--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
805-685-1006
http://www.eiffel.com
Customer support: http://support.eiffel.com
User group: http://groups.eiffel.com/join
------------------------------------------------------------------------


[Non-text portions of this message have been removed]
Eric Bezault ericb@gobosoft.com [eiffel_software]
2015-08-03 13:42:29 UTC
Permalink
Post by Jocelyn Fiat ***@eiffel.com [eiffel_software]
I think only EV_PIXEL_BUFFER provides feature to edit and add transparency .
So the way to go would be
create the pixmap as an EV_PIXEL_BUFFER, and then use
{EV_PIXEL_BUFFER}.to_pixmap to get an EV_PIXMAP.
I had tried that, and it works.
But EV_PIXEL_BUFFER does not have all the nice `draw_' features
from EV_DRAWABLE. So it's not very useful.
--
Eric Bezault
mailto:***@gobosoft.com
http://www.gobosoft.com
finnian@eiffel-loop.com [eiffel_software]
2015-08-16 14:42:59 UTC
Permalink
Hi Eric
the Eiffel-Loop library has a class EL_DRAWABLE_PIXEL_BUFFER that extends EV_PIXEL_BUFFER and has support for transparent backgrounds. The class acts as a wrapper for the Cairo graphics library and supports many of the Cairo drawing and filling routines. The only caveat is you have to distribute about 20 Windows DLL with your application. **

It is used extensively in the software product at this website. This product works equally well on Windows and Linux Mint although I don't have an installer for the Linux version as yet.

http://myching.software http://myching.software

(Anywhere you see rounded corners are transparency examples)

Of related interest :
class EL_PNG_IMAGE_FILE which has the ability to render SVG xml using librsvg.

class EL_DRAWING_AREA_BUTTON emulates buttons on a drawing area. This makes it possible to have a transparent button image layered onto a png background with proper anti-aliasing.

class EL_DECORATED_BUTTON displays different background SVG images corresponding to the states: normal, mouse hover, mouse click.

All of these classes will be available in version 1.2.6 of Eiffel-Loop soon to be released at https://github.com/finnianr/eiffel-loop https://github.com/finnianr/eiffel-loop
(as soon as I figure out how to push my changes back to the server)

regards
Finnian

**
The EL_DRAWABLE_PIXEL_BUFFER has an external C bridge that is built using a scons script. For the Windows implementation the scons builder uses prebuilt DLLs available at win32builder.gnome.org and builds the DLL stubs from these. However there is a bug in the Python zip library which prevents the extraction of DLLs from very large (30 mb+) zip files so I decided to host a minimal package of required DLLs at eiffel-loop.com. The builder can create either a 32-bit or 64-bit library as required using standard MS C++ SDK.

[Non-text portions of this message have been removed]

'Emmanuel Stapf' manus@eiffel.com [eiffel_software]
2015-08-03 17:53:34 UTC
Permalink
Note that you can use {EV_PIXMAP}.set_mask to set the transparency. Unlike EV_PIXEL_BUFFER this is a all or nothing transparency, since there is no support for alpha channel.

Regards,
Manu
-----Original Message-----
Sent: Monday, August 03, 2015 04:55
Subject: [eiffel_software] EV_PIXMAP with transparent background
Hello,
Is there a way to programmatically create a pixmap using EV_PIXMAP with a
transparent background.
When I don't call `set_background_color', I get a grey back ground. And I see no
way to get an EV_COLOR which would represent a transparent color.
--
Eric Bezault
http://www.gobosoft.com
------------------------------------
------------------------------------
------------------------------------------------------------------------
Eiffel Software
http://www.eiffel.com
Customer support: http://support.eiffel.com
User group: http://groups.eiffel.com/join
------------------------------------------------------------------------
------------------------------------
Yahoo Groups Links
Loading...