* Return value: A newly created Cairo context. Free with
* cairo_destroy() when you are done drawing.
*
- * Since: 2.10
+ * Since: 2.8
**/
cairo_t *
gdk_cairo_create (GdkDrawable *drawable)
* @rectangle: a #GdkRectangle
*
* Adds the given rectangle to the current path of @cr.
+ *
+ * Since: 2.8
**/
void
gdk_cairo_rectangle (cairo_t *cr,
* @region: a #GdkRegion
*
* Adds the given region to the current path of @cr.
+ *
+ * Since: 2.8
**/
void
gdk_cairo_region (cairo_t *cr,
* Sets the given pixbuf as the source pattern for the Cairo context.
* The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
* so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y
+ *
+ * Since: 2.8
**/
void
gdk_cairo_set_source_pixbuf (cairo_t *cr,
while (p < end)
{
-#if G_BYTE_ORDER == GDK_LSB_FIRST
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
q[0] = p[2];
q[1] = p[1];
- q[2] = p[2];
+ q[2] = p[0];
#else
- q[0] = p[0];
- q[1] = p[1];
- q[2] = p[2];
+ q[1] = p[0];
+ q[2] = p[1];
+ q[3] = p[2];
#endif
p += 3;
q += 4;
}
cairo_set_source_surface (cr, surface, pixbuf_x, pixbuf_y);
+ cairo_surface_destroy (surface);
}
#define __GDK_CAIRO_C__