if (image->background)
{
theme_pixbuf_render (image->background,
- window, NULL, area,
+ window, area,
draw_center ? COMPONENT_ALL : COMPONENT_ALL | COMPONENT_CENTER,
FALSE,
x, y, width, height);
if (image->overlay && draw_center)
theme_pixbuf_render (image->overlay,
- window, NULL, area, COMPONENT_ALL,
+ window, area, COMPONENT_ALL,
TRUE,
x, y, width, height);
if (image->background)
theme_pixbuf_render (image->background,
- window, NULL, area, components, FALSE,
+ window, area, components, FALSE,
x, y, width, height);
if (image->gap_start)
theme_pixbuf_render (image->gap_start,
- window, NULL, area, COMPONENT_ALL, FALSE,
+ window, area, COMPONENT_ALL, FALSE,
r1.x, r1.y, r1.width, r1.height);
if (image->gap)
theme_pixbuf_render (image->gap,
- window, NULL, area, COMPONENT_ALL, FALSE,
+ window, area, COMPONENT_ALL, FALSE,
r2.x, r2.y, r2.width, r2.height);
if (image->gap_end)
theme_pixbuf_render (image->gap_end,
- window, NULL, area, COMPONENT_ALL, FALSE,
+ window, area, COMPONENT_ALL, FALSE,
r3.x, r3.y, r3.width, r3.height);
return TRUE;
{
if (image->background)
theme_pixbuf_render (image->background,
- window, NULL, area, COMPONENT_ALL, FALSE,
+ window, area, COMPONENT_ALL, FALSE,
x1, y, (x2 - x1) + 1, 2);
}
else
{
if (image->background)
theme_pixbuf_render (image->background,
- window, NULL, area, COMPONENT_ALL, FALSE,
+ window, area, COMPONENT_ALL, FALSE,
x, y1, 2, (y2 - y1) + 1);
}
else
pixbuf_render (GdkPixbuf *src,
guint hints,
GdkWindow *window,
- GdkBitmap *mask,
GdkRectangle *clip_rect,
gint src_x,
gint src_y,
if (hints & THEME_MISSING)
return;
- /* FIXME: Because we use the mask to shape windows, we don't use
- * clip_rect to clip what we draw to the mask, only to clip
- * what we actually draw. But this leads to the horrible ineffiency
- * of scale the whole image to get a little bit of it.
- */
- if (!mask && clip_rect)
+ if (clip_rect)
{
if (!gdk_rectangle_intersect (clip_rect, &rect, &rect))
return;
{
cairo_t *cr;
- if (mask)
- {
- cr = gdk_cairo_create (mask);
-
- gdk_cairo_set_source_pixbuf (cr, tmp_pixbuf,
- -x_offset + rect.x,
- -y_offset + rect.y);
- gdk_cairo_rectangle (cr, &rect);
- cairo_fill (cr);
-
- cairo_destroy (cr);
- }
-
cr = gdk_cairo_create (window);
gdk_cairo_set_source_pixbuf (cr,
tmp_pixbuf,
void
theme_pixbuf_render (ThemePixbuf *theme_pb,
GdkWindow *window,
- GdkBitmap *mask,
GdkRectangle *clip_rect,
guint component_mask,
gboolean center,
-#define RENDER_COMPONENT(X1,X2,Y1,Y2) \
- pixbuf_render (pixbuf, theme_pb->hints[Y1][X1], window, mask, clip_rect, \
- src_x[X1], src_y[Y1], \
- src_x[X2] - src_x[X1], src_y[Y2] - src_y[Y1], \
- dest_x[X1], dest_y[Y1], \
+#define RENDER_COMPONENT(X1,X2,Y1,Y2) \
+ pixbuf_render (pixbuf, theme_pb->hints[Y1][X1], window, clip_rect, \
+ src_x[X1], src_y[Y1], \
+ src_x[X2] - src_x[X1], src_y[Y2] - src_y[Y1], \
+ dest_x[X1], dest_y[Y1], \
dest_x[X2] - dest_x[X1], dest_y[Y2] - dest_y[Y1]);
if (component_mask & COMPONENT_NORTH_WEST)
x += (width - pixbuf_width) / 2;
y += (height - pixbuf_height) / 2;
- pixbuf_render (pixbuf, 0, window, NULL, clip_rect,
+ pixbuf_render (pixbuf, 0, window, clip_rect,
0, 0,
pixbuf_width, pixbuf_height,
x, y,