+#include "render.h"
+#include "color.h"
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <string.h>
-#include "render.h"
-#include "color.h"
void RrColorAllocateGC(RrColor *in)
{
break;
default:
- g_message("your bit depth is currently unhandled\n");
+ g_warning("your bit depth is currently unhandled\n");
}
}
{
int x, y, di;
- g_message("SWAPPING BYTE ORDER");
-
di = 0;
for (y = 0; y < im->height; ++y) {
for (x = 0; x < im->height; ++x) {
case 8:
break;
default:
- g_message("your bit depth is currently unhandled\n");
+ g_warning("your bit depth is currently unhandled");
}
}
di += im->bytes_per_line;
RrPixel16 *p16 = (RrPixel16 *) im->data;
unsigned char *p8 = (unsigned char *)im->data;
- if (im->byte_order != RrEndian)
+ if (im->byte_order != LSBFirst)
swap_byte_order(im);
switch (im->bits_per_pixel) {
}
break;
case 8:
- g_message("this image bit depth is currently unhandled\n");
+ g_warning("this image bit depth is currently unhandled");
break;
case 1:
for (y = 0; y < im->height; y++) {
}
break;
default:
- g_message("this image bit depth is currently unhandled\n");
+ g_warning("this image bit depth is currently unhandled");
}
}
+
+int RrColorRed(const RrColor *c)
+{
+ return c->r;
+}
+
+int RrColorGreen(const RrColor *c)
+{
+ return c->g;
+}
+
+int RrColorBlue(const RrColor *c)
+{
+ return c->b;
+}
+
+gulong RrColorPixel(const RrColor *c)
+{
+ return c->pixel;
+}