+ data += im->width;
+ p += im->bytes_per_line;
+ }
+ im->data = (char*)ret;
+}
+
+void PseudoRenderControl::allocateColor(XColor *color) const
+{
+ const XColor *c = pickColor(color->red, color->blue, color->green);
+
+ color->red = c->red;
+ color->green = c->green;
+ color->blue = c->blue;
+ color->pixel = c->pixel;
+
+ if (XAllocColor(**display, display->screenInfo(_screen)->colormap(), color))
+ color->flags = DoRed|DoGreen|DoBlue; // mark as alloced
+ else
+ assert(false); // wtf has gone wrong, its already alloced for chissake!