1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 13:39:10 +00:00
conky/lua
Jochen Keil 56b5a7eeca Wrapper for drawing images with imlib2 and cairo
One problem is, that tolua/lua does not handle plain data pointers
properly. Therefore something like

local surface = cairo_image_surface_create_for_data(
    imlib_image_get_data_for_reading_only(), ..

will fail using the lua bindings. Hence this wrapper, which adds
a function which be used to draw an imlib image to a cairo surface.

This also addresses another issue, drawing images with a transparent
background (e.g. gifs or pngs) to the cairo surface properly. Apparently
the image format of imlib is incompatible to cairos which uses
pre-multiplied data. This is also explained in the cairo documentation.
A fix for this issue is to blend the image with another alpha mask to
get the correct values. The code and explanation for this was taken from

  http://lists.cairographics.org/archives/cairo/2008-March/013492.html

Executive Summary: This wrapper function can load (transparent) images
(e.g. gif or png) from a file by using imlib and draw them on a cairo
surface.
2013-06-08 12:09:35 +02:00
..
cairo_imlib2_helper.pkg Wrapper for drawing images with imlib2 and cairo 2013-06-08 12:09:35 +02:00
cairo.pkg Fix "wrong type of arguments for cairo_set_dash", sf.net #3014648 2010-06-13 18:57:07 +02:00
CMakeLists.txt Wrapper for drawing images with imlib2 and cairo 2013-06-08 12:09:35 +02:00
imlib2.pkg remove imlib_clip_line from lua/imlib2.pkg; the actual code for this (was in rgbadraw.c) has been removed upstream but not the prototype 2009-07-26 19:31:53 +02:00
libcairo_imlib2_helper.h Wrapper for drawing images with imlib2 and cairo 2013-06-08 12:09:35 +02:00
libcairo-helper.h Update version, copyright. 2012-05-03 16:34:44 -07:00
libcairo.patch Fix "wrong type of arguments for cairo_set_dash", sf.net #3014648 2010-06-13 18:57:07 +02:00
librsvg-helper.h Include header file for helper functions 2013-05-22 22:38:17 +02:00
rsvg.pkg Include header file for helper functions 2013-05-22 22:38:17 +02:00