From 4650e4ce6c3ff004249db6e684c783f74dc4820e Mon Sep 17 00:00:00 2001 From: lecoanet Date: Thu, 4 Jan 2001 10:48:21 +0000 Subject: Ajout de la compilation conditionnelle de libart --- generic/Rectangle.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'generic/Rectangle.c') diff --git a/generic/Rectangle.c b/generic/Rectangle.c index f2b3d68..6723631 100644 --- a/generic/Rectangle.c +++ b/generic/Rectangle.c @@ -77,8 +77,10 @@ typedef struct _RectangleItemStruct { ZnPoint dev[4]; ZnImage tile; ZnColorGradient gradient; +#ifdef LIBART ArtSVP *outline_svp; ArtSVP *fill_svp; +#endif } RectangleItemStruct, *RectangleItem; @@ -211,7 +213,9 @@ Init(Item item, ZnNameOfColor(wi->fore_color)); rect->fill_alpha = 255; rect->grad_geom = NULL; +#ifdef LIBART rect->outline_svp = rect->fill_svp = NULL; +#endif return ZN_OK; } @@ -254,7 +258,9 @@ Clone(Item item) if (rect->grad_geom) { rect->grad_geom = GradientGeomDuplicate(rect->grad_geom); } +#ifdef LIBART rect->outline_svp = rect->fill_svp = NULL; +#endif } @@ -292,12 +298,14 @@ Destroy(Item item) if (rect->grad_geom) { GradientGeomDelete(rect->grad_geom); } +#ifdef LIBART if (rect->outline_svp) { art_svp_free(rect->outline_svp); } if (rect->fill_svp) { art_svp_free(rect->fill_svp); } +#endif } @@ -425,7 +433,8 @@ ComputeCoordinates(Item item, item->item_bounding_box.corner.x += 1; item->item_bounding_box.corner.y += 1; - if (wi->local_render) { + if (wi->render) { +#ifdef LIBART ArtVpath vpath[6]; if (ISSET(rect->flags, FILLED_BIT) || rect->line_width) { @@ -463,6 +472,7 @@ ComputeCoordinates(Item item, ART_PATH_STROKE_CAP_SQUARE, rect->line_width, 2, 1); } +#endif } } @@ -680,6 +690,7 @@ Draw(Item item) static void Render(Item item) { +#ifdef LIBART WidgetInfo *wi = item->wi; RectangleItem rect = (RectangleItem) item; XColor *color = ZnColorGradientMidColor(wi->win, rect->fill_color); @@ -700,6 +711,7 @@ Render(Item item) rect->line_color->green, rect->line_color->blue, rect->line_alpha & 0xff, 0, 0, NULL); } +#endif } -- cgit v1.1