aboutsummaryrefslogtreecommitdiff
path: root/generic/Rectangle.c
diff options
context:
space:
mode:
authorlecoanet2000-12-22 17:28:39 +0000
committerlecoanet2000-12-22 17:28:39 +0000
commit7a18fd6f2aa04ad111f8cfb3a4f763c7630f6380 (patch)
tree90e566bf4037fbeff31a6faf057f5b04bfcfdece /generic/Rectangle.c
parent104ac5b59e080c6c640b526eaaa7830b13d0d8b2 (diff)
downloadtkzinc-7a18fd6f2aa04ad111f8cfb3a4f763c7630f6380.zip
tkzinc-7a18fd6f2aa04ad111f8cfb3a4f763c7630f6380.tar.gz
tkzinc-7a18fd6f2aa04ad111f8cfb3a4f763c7630f6380.tar.bz2
tkzinc-7a18fd6f2aa04ad111f8cfb3a4f763c7630f6380.tar.xz
Realisation de Render.
Diffstat (limited to 'generic/Rectangle.c')
-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,