diff options
Diffstat (limited to 'generic/Arc.c')
-rw-r--r-- | generic/Arc.c | 18 |
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 } |