Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

Example of tranparent plugin for Home

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


jobi at via

Mar 11, 2008, 7:55 AM

Post #1 of 2 (829 views)
Permalink
Example of tranparent plugin for Home

Hi,

I put an example of transparent home plugin at:
https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-home-weather/

It's not meant to be functional but to be an illustration on how to
build transparent applets using cairo.

Please report any issue or question!
--
Johan Bilien
<jobi [at] via>
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


kalle.vahlman at gmail

Mar 11, 2008, 9:36 AM

Post #2 of 2 (734 views)
Permalink
Re: Example of tranparent plugin for Home [In reply to]

2008/3/11, Johan Bilien <jobi [at] via>:
> Hi,
>
> I put an example of transparent home plugin at:
> https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-home-weather/
>
> It's not meant to be functional but to be an illustration on how to
> build transparent applets using cairo.
>
> Please report any issue or question!

Well, since you asked for it ;) here's some comments:

/* Initialize the pixmap with a full empty transparent rectangle */
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);

There's CAIRO_OPERATOR_CLEAR, is there particular reason for not using
it? Conceptually it could even be faster than source op since it
simply ignores the source but I guess it depends on what it actually
is reduced to (for example memset vs memcpy).

Also, you could use cairo_create_similar() to create cairo surfaces to
hold the image data instead of creating a GdkPixmaps, it's designed to
do what you want with less code what there is now.

--
Kalle Vahlman, zuh [at] iki
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.