aboutsummaryrefslogtreecommitdiff
path: root/generic/Arc.c
diff options
context:
space:
mode:
authorlecoanet2001-01-04 10:48:21 +0000
committerlecoanet2001-01-04 10:48:21 +0000
commit4650e4ce6c3ff004249db6e684c783f74dc4820e (patch)
treeeb556faa71ccc8aa98d0564e257cb22a18266e98 /generic/Arc.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/Arc.c')
-rw-r--r--generic/Arc.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/generic/Arc.c b/generic/Arc.c
index 10bcb9c..f3699c8 100644
--- a/generic/Arc.c
+++ b/generic/Arc.c
@@ -92,8 +92,10 @@ typedef struct _ArcItemStruct {
ZnPoint center2;
ZnImage tile;
ZnList render_shape;
+#ifdef LIBART
ArtSVP *outline_svp;
ArtSVP *fill_svp;
+#endif
} ArcItemStruct, *ArcItem;
@@ -240,8 +242,10 @@ Init(Item item,
arc->line_alpha = 255;
arc->line_color = ZnGetColorByValue(wi->win, wi->fore_color);
arc->grad_geom = NULL;
+#ifdef LIBART
arc->outline_svp = arc->fill_svp = NULL;
-
+#endif
+
return ZN_OK;
}
@@ -286,7 +290,9 @@ Clone(Item item)
if (arc->grad_geom) {
arc->grad_geom = GradientGeomDuplicate(arc->grad_geom);
}
+#ifdef LIBART
arc->outline_svp = arc->fill_svp = NULL;
+#endif
arc->render_shape = NULL;
}
@@ -307,12 +313,14 @@ Destroy(Item item)
if (arc->render_shape) {
ZnListFree(arc->render_shape);
}
+#ifdef LIBART
if (arc->outline_svp) {
art_svp_free(arc->outline_svp);
}
if (arc->fill_svp) {
art_svp_free(arc->fill_svp);
}
+#endif
if (arc->first_end) {
LineEndDelete(arc->first_end);
}
@@ -526,7 +534,7 @@ ComputeCoordinates(Item item,
width_2 = (arc->coords[1].x - arc->coords[0].x)/2.0;
height_2 = (arc->coords[1].y - arc->coords[0].y)/2.0;
if (((angle >= PRECISION_LIMIT) && ((width_2 - height_2) > PRECISION_LIMIT)) ||
- arc->grad_geom || wi->local_render) {
+ arc->grad_geom || wi->render) {
SET(arc->flags, USING_POLY_BIT);
if (!arc->render_shape) {
arc->render_shape = ZnListNew(4, sizeof(ZnPoint));
@@ -569,7 +577,8 @@ ComputeCoordinates(Item item,
AddPointsToBBox(&item->item_bounding_box, end_points, LINE_END_POINTS);
}
- if (wi->local_render) {
+ if (wi->render) {
+#ifdef LIBART
ArtVpath *vpath;
GetBezierPath(arc->render_shape, wi->work_pts);
@@ -607,6 +616,7 @@ ComputeCoordinates(Item item,
arc->line_width, 2, 1);
}
ZnFree(vpath);
+#endif
}
return;
}
@@ -1219,6 +1229,7 @@ Draw(Item item)
static void
Render(Item item)
{
+#ifdef LIBART
WidgetInfo *wi = item->wi;
ArcItem arc = (ArcItem) item;
XColor *color = ZnColorGradientMidColor(wi->win, arc->fill_color);
@@ -1239,6 +1250,7 @@ Render(Item item)
arc->line_color->green, arc->line_color->blue,
arc->line_alpha & 0xff, 0, 0, NULL);
}
+#endif
}