]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkcairo.c
Updated Spanish translation.
[~andy/gtk] / gdk / gdkcairo.c
index 4e498546faca2b2a6cde5188a801773a4b83de99..5c011c08890bc10d7acf68a9ebfdf97c0122b08f 100644 (file)
@@ -32,7 +32,7 @@
  * 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)
@@ -77,6 +77,8 @@ gdk_cairo_set_source_color (cairo_t  *cr,
  * @rectangle: a #GdkRectangle
  * 
  * Adds the given rectangle to the current path of @cr.
+ *
+ * Since: 2.8
  **/
 void
 gdk_cairo_rectangle (cairo_t      *cr,
@@ -96,6 +98,8 @@ 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,
@@ -128,6 +132,8 @@ 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,
@@ -169,14 +175,14 @@ 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;
@@ -215,6 +221,7 @@ gdk_cairo_set_source_pixbuf (cairo_t   *cr,
     }
 
   cairo_set_source_surface (cr, surface, pixbuf_x, pixbuf_y);
+  cairo_surface_destroy (surface);
 }
 
 #define __GDK_CAIRO_C__