From 7a18fd6f2aa04ad111f8cfb3a4f763c7630f6380 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 22 Dec 2000 17:28:39 +0000 Subject: Realisation de Render. --- generic/Rectangle.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'generic/Rectangle.c') 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, -- cgit v1.1