aboutsummaryrefslogtreecommitdiff
path: root/generic/Rectangle.c
diff options
context:
space:
mode:
authorlecoanet2001-01-04 10:48:21 +0000
committerlecoanet2001-01-04 10:48:21 +0000
commit4650e4ce6c3ff004249db6e684c783f74dc4820e (patch)
treeeb556faa71ccc8aa98d0564e257cb22a18266e98 /generic/Rectangle.c
parente4e6cd076aacae005af8347e3199c75e1cfd42aa (diff)
downloadtkzinc-4650e4ce6c3ff004249db6e684c783f74dc4820e.zip
tkzinc-4650e4ce6c3ff004249db6e684c783f74dc4820e.tar.gz
tkzinc-4650e4ce6c3ff004249db6e684c783f74dc4820e.tar.bz2
tkzinc-4650e4ce6c3ff004249db6e684c783f74dc4820e.tar.xz
Ajout de la compilation conditionnelle de libart
Diffstat (limited to 'generic/Rectangle.c')
-rw-r--r--generic/Rectangle.c14
1 files changed, 13 insertions, 1 deletions
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
}