XColor *pseudo_colors;
int pseudo_bpc;
-void color_allocate_gc(RrColor *in)
+void RrColorAllocateGC(RrColor *in)
{
XGCValues gcv;
}
}
-void reduce_depth(const RrInstance *inst, RrPixel32 *data, XImage *im)
+void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im)
{
int r, g, b;
int x,y;
g_assert(RrVisual(inst)->class != TrueColor);
for (y = 0; y < im->height; y++) {
for (x = 0; x < im->width; x++) {
- p8[x] = pickColor(inst,
- data[x] >> RrDefaultRedOffset,
- data[x] >> RrDefaultGreenOffset,
- data[x] >> RrDefaultBlueOffset)->pixel;
+ p8[x] = RrPickColor(inst,
+ data[x] >> RrDefaultRedOffset,
+ data[x] >> RrDefaultGreenOffset,
+ data[x] >> RrDefaultBlueOffset)->pixel;
}
data += im->width;
p8 += im->bytes_per_line;
}
}
-XColor *pickColor(const RrInstance *inst, gint r, gint g, gint b)
+XColor *RrPickColor(const RrInstance *inst, gint r, gint g, gint b)
{
r = (r & 0xff) >> (8-pseudo_bpc);
g = (g & 0xff) >> (8-pseudo_bpc);
im->byte_order = LSBFirst;
}
-void increase_depth(const RrInstance *inst, RrPixel32 *data, XImage *im)
+void RrIncreaseDepth(const RrInstance *inst, RrPixel32 *data, XImage *im)
{
int r, g, b;
int x,y;
GC gc;
};
-void color_allocate_gc(RrColor *in);
-XColor *pickColor(const RrInstance *inst, gint r, gint g, gint b);
-void reduce_depth(const RrInstance *inst, RrPixel32 *data, XImage *im);
-void increase_depth(const RrInstance *inst, RrPixel32 *data, XImage *im);
+void RrColorAllocateGC(RrColor *in);
+XColor *RrPickColor(const RrInstance *inst, gint r, gint g, gint b);
+void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im);
+void RrIncreaseDepth(const RrInstance *inst, RrPixel32 *data, XImage *im);
#endif /* __color_h */
if (b > 0xFF) b = 0xFF;
g_assert(!l->surface.bevel_light);
l->surface.bevel_light = RrColorNew(l->inst, r, g, b);
- color_allocate_gc(l->surface.bevel_light);
+ RrColorAllocateGC(l->surface.bevel_light);
/* dark color */
r = l->surface.primary->r;
b = (b >> 1) + (b >> 2);
g_assert(!l->surface.bevel_dark);
l->surface.bevel_dark = RrColorNew(l->inst, r, g, b);
- color_allocate_gc(l->surface.bevel_dark);
+ RrColorAllocateGC(l->surface.bevel_dark);
}
void gradient_solid(RrAppearance *l, int x, int y, int w, int h)
int left = x, top = y, right = x + w - 1, bottom = y + h - 1;
if (sp->primary->gc == None)
- color_allocate_gc(sp->primary);
+ RrColorAllocateGC(sp->primary);
pix = (sp->primary->r << RrDefaultRedOffset)
+ (sp->primary->g << RrDefaultGreenOffset)
+ (sp->primary->b << RrDefaultBlueOffset);
if (sp->interlaced) {
if (sp->secondary->gc == None)
- color_allocate_gc(sp->secondary);
+ RrColorAllocateGC(sp->secondary);
for (i = y; i < h; i += 2)
XDrawLine(RrDisplay(l->inst), l->pixmap, sp->secondary->gc,
x, i, w, i);
case RR_RELIEF_FLAT:
if (sp->border) {
if (sp->border_color->gc == None)
- color_allocate_gc(sp->border_color);
+ RrColorAllocateGC(sp->border_color);
XDrawRectangle(RrDisplay(l->inst), l->pixmap, sp->border_color->gc,
left, top, right, bottom);
}
#include <glib.h>
-void image_draw(RrPixel32 *target, RrTextureRGBA *rgba, Rect *area)
+void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba, Rect *area)
{
RrPixel32 *draw = rgba->data;
gint c, i, e, t, sfw, sfh;
RrPixmapMaskDraw(l->pixmap, &l->texture[i].data.mask, &tarea);
break;
case RR_TEXTURE_RGBA:
- image_draw(l->surface.RrPixel_data,
- &l->texture[i].data.rgba, &tarea);
+ RrImageDraw(l->surface.RrPixel_data,
+ &l->texture[i].data.rgba, &tarea);
break;
}
}