aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Rectangle.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/generic/Rectangle.c b/generic/Rectangle.c
index 840a45b..f2b3d68 100644
--- a/generic/Rectangle.c
+++ b/generic/Rectangle.c
@@ -254,10 +254,7 @@ Clone(Item item)
if (rect->grad_geom) {
rect->grad_geom = GradientGeomDuplicate(rect->grad_geom);
}
- if (rect->outline_svp) {
- }
- if (rect->fill_svp) {
- }
+ rect->outline_svp = rect->fill_svp = NULL;
}
@@ -583,16 +580,28 @@ Draw(Item item)
Pixmap pmap = GetImagePixmap(wi->win, rect->tile_name, rect->tile, NULL);
values.fill_style = FillTiled;
values.tile = pmap;
- values.ts_x_origin = (int) item->item_bounding_box.orig.x;
- values.ts_y_origin = (int) item->item_bounding_box.orig.y;
+ if (aligned) {
+ values.ts_x_origin = (int) r.x;
+ values.ts_y_origin = (int) r.y;
+ }
+ else {
+ values.ts_x_origin = (int) item->item_bounding_box.orig.x;
+ values.ts_y_origin = (int) item->item_bounding_box.orig.y;
+ }
XChangeGC(wi->dpy, wi->gc,
GCTileStipXOrigin|GCTileStipYOrigin|GCFillStyle|GCTile, &values);
}
else if (rect->fill_pattern != ZnUnspecifiedPattern) { /* Fill stippled */
values.fill_style = FillStippled;
values.stipple = rect->fill_pattern;
- values.ts_x_origin = (int) item->item_bounding_box.orig.x;
- values.ts_y_origin = (int) item->item_bounding_box.orig.y;
+ if (aligned) {
+ values.ts_x_origin = (int) r.x;
+ values.ts_y_origin = (int) r.y;
+ }
+ else {
+ values.ts_x_origin = (int) item->item_bounding_box.orig.x;
+ values.ts_y_origin = (int) item->item_bounding_box.orig.y;
+ }
XChangeGC(wi->dpy, wi->gc,
GCTileStipXOrigin|GCTileStipYOrigin|GCFillStyle|GCStipple|GCForeground,
&values);
@@ -680,6 +689,7 @@ Render(Item item)
if (strlen(rect->tile_name) != 0) {
pixbuf = GetImagePixbuf(wi->win, rect->tile_name, rect->tile);
}
+
ITEM_P.RenderSVP(wi, rect->fill_svp, color->red, color->green,
color->blue, rect->fill_alpha & 0xff,
item->item_bounding_box.orig.x,