]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkpixbuf-drawable.c
Updated Basque translation.
[~andy/gtk] / gdk / gdkpixbuf-drawable.c
index 47fadee01f359e18b96b4e95071d9713fb6ad534..98c399be04c5a890431ea552dca050491c21e92f 100644 (file)
@@ -22,7 +22,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <config.h>
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include "gdkcolor.h"
@@ -33,6 +33,7 @@
 #include "gdkpixmap.h"
 #include "gdk-pixbuf-private.h"
 #include "gdkinternals.h"
+#include "gdkalias.h"
 
 /* Some convenient names
  */
@@ -49,7 +50,7 @@
 
 \f
 
-static guint32 mask_table[] = {
+static const guint32 mask_table[] = {
   0x00000000, 0x00000001, 0x00000003, 0x00000007,
   0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f,
   0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff,
@@ -379,8 +380,8 @@ rgb8a (GdkImage    *image,
  * RGBA8888: RGBA, 32-bit native endian
  */
 #define R8fromRGB565(d) ((((d) >> 8) & 0xf8) | (((d) >> 13) & 0x7))
-#define B8fromRGB565(d) ((((d) >> 3) & 0xfc) | (((d) >> 9)  & 0x3))
-#define G8fromRGB565(d) ((((d) << 3) & 0xf8) | (((d) >> 2)  & 0x7))
+#define G8fromRGB565(d) ((((d) >> 3) & 0xfc) | (((d) >> 9)  & 0x3))
+#define B8fromRGB565(d) ((((d) << 3) & 0xf8) | (((d) >> 2)  & 0x7))
 
 #define ABGR8888fromRGB565(d) (  ((d) & 0xf800) >> 8  | ((d) & 0xe000) >> 13 \
                               | ((d) & 0x07e0) << 5  | ((d) & 0x0600) >> 1  \
@@ -392,8 +393,8 @@ rgb8a (GdkImage    *image,
                               | 0xff)
 
 #define R8fromRGB555(d) (((d) & 0x7c00) >> 7 | ((d) & 0x7000) >> 12)
-#define B8fromRGB555(d) (((d) & 0x03e0) >> 2 | ((d) & 0x0380) >> 7)
-#define G8fromRGB555(d) (((d) & 0x001f) << 3 | ((d) & 0x001c) >> 2)
+#define G8fromRGB555(d) (((d) & 0x03e0) >> 2 | ((d) & 0x0380) >> 7)
+#define B8fromRGB555(d) (((d) & 0x001f) << 3 | ((d) & 0x001c) >> 2)
 
 #define ABGR8888fromRGB555(d) (  ((d) & 0x7c00) >> 7  | ((d) & 0x7000) >> 12 \
                               | ((d) & 0x03e0) << 6  | ((d) & 0x0380) << 1  \
@@ -924,7 +925,6 @@ convert_real_slow (GdkImage    *image,
                   gboolean     alpha)
 {
   int xx, yy;
-  int bpl;
   guint8 *orow = pixels;
   guint8 *o;
   guint32 pixel;
@@ -932,8 +932,7 @@ convert_real_slow (GdkImage    *image,
   guint8 component;
   int i;
 
-  bpl = image->bpl;
-  v = gdk_colormap_get_visual(cmap);
+  v = gdk_colormap_get_visual (cmap);
 
   if (image->depth != v->depth)
     {
@@ -953,7 +952,7 @@ convert_real_slow (GdkImage    *image,
       o = orow;
       for (xx = x1; xx < x2; xx++)
        {
-         pixel = gdk_image_get_pixel(image, xx, yy);
+         pixel = gdk_image_get_pixel (image, xx, yy);
          switch (v->type)
            {
                                /* I assume this is right for static & greyscale's too? */
@@ -1005,7 +1004,7 @@ typedef void (* cfunc) (GdkImage    *image,
                         int          y2,
                         GdkColormap *cmap);
 
-static cfunc convert_map[] = {
+static const cfunc convert_map[] = {
   rgb1,rgb1,rgb1a,rgb1a,
   rgb8,rgb8,rgb8a,rgb8a,
   rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb,
@@ -1298,8 +1297,8 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf   *dest,
          image = _gdk_image_get_scratch (gdk_drawable_get_screen (src), 
                                          width1, height1, depth, &xs0, &ys0);
 
-         _gdk_drawable_copy_to_image (src, image,
-                                      src_x + x0, src_y + y0,
+         gdk_drawable_copy_to_image (src, image,
+                                     src_x + x0, src_y + y0,
                                       xs0, ys0, width1, height1);
 
          gdk_pixbuf_get_from_image (dest, image, cmap,
@@ -1411,3 +1410,6 @@ gdk_pixbuf_get_from_image (GdkPixbuf   *dest,
   
   return dest;
 }
+
+#define __GDK_PIXBUF_DRAWABLE_C__
+#include "gdkaliasdef.c"