2008/3/11, Johan Bilien <[EMAIL PROTECTED]>:
> 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, [EMAIL PROTECTED]
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to