#include "font.h"
#include "mask.h"
#include "color.h"
+#include "image.h"
#include "../kernel/openbox.h"
int render_depth;
l->xftdraw = XftDrawCreate(ob_display, l->pixmap,
render_visual, render_colormap);
}
- font_draw(l->xftdraw, &l->texture[i].data.text, x, y, w, h);
+ font_draw(l->xftdraw, &l->texture[i].data.text,
+ &l->texture[i].position);
break;
case Bitmask:
if (l->texture[i].data.mask.color->gc == None)
color_allocate_gc(l->texture[i].data.mask.color);
- mask_draw(l->pixmap, &l->texture[i].data.mask, w, h);
+ mask_draw(l->pixmap, &l->texture[i].data.mask,
+ &l->texture[i].position);
+ break;
+ case RGBA:
+ image_draw(l->surface.data.planar.pixel_data,
+ &l->texture[i].data.rgba,
+ &l->texture[i].position);
break;
}
}
out->surface.type = type;
out->textures = numtex;
out->xftdraw = NULL;
- if (numtex) out->texture = g_new(Texture, numtex);
+ if (numtex) out->texture = g_new0(Texture, numtex);
else out->texture = NULL;
out->pixmap = None;