diff options
author | lecoanet | 2002-03-29 13:00:48 +0000 |
---|---|---|
committer | lecoanet | 2002-03-29 13:00:48 +0000 |
commit | 9b450c4142005050f7cf329f9a27e6debfb1e738 (patch) | |
tree | 983eef05cdbeff454acd163fbca6b2b1f9d695fd /generic/Arc.c | |
parent | 510ade508aa4eedb6b4b532a1ca3522572ef3e06 (diff) | |
download | tkzinc-9b450c4142005050f7cf329f9a27e6debfb1e738.zip tkzinc-9b450c4142005050f7cf329f9a27e6debfb1e738.tar.gz tkzinc-9b450c4142005050f7cf329f9a27e6debfb1e738.tar.bz2 tkzinc-9b450c4142005050f7cf329f9a27e6debfb1e738.tar.xz |
* Correction d'un core dump dans Clone. Les structures geometriques
�taient mises � NULL pour �tre remplies par ComputeCoordinates. En fait
il fallait les copier tout de suite.
* Les flags sont dans un unsigned short (16 flags).
* Adaptation de RenderPolyline (closed inutile).
Diffstat (limited to 'generic/Arc.c')
-rw-r--r-- | generic/Arc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/generic/Arc.c b/generic/Arc.c index 253aaef..9fdbc34 100644 --- a/generic/Arc.c +++ b/generic/Arc.c @@ -80,7 +80,7 @@ typedef struct _ArcItemStruct { ZnLineEnd first_end; ZnLineEnd last_end; char *tile_name; - unsigned char flags; + unsigned short flags; /* Private data */ ZnPoint orig; @@ -246,7 +246,11 @@ Clone(Item item) WidgetInfo *wi = item->wi; char *text; - arc->grad_geo = NULL; + if (arc->grad_geo) { + ZnPoint *grad_geo = ZnMalloc(4*sizeof(ZnPoint)); + memcpy(grad_geo, arc->grad_geo, 4*sizeof(ZnPoint)); + arc->grad_geo = grad_geo; + } if (arc->tile != ZnUnspecifiedImage) { text = ZnMalloc((strlen(arc->tile_name) + 1) * sizeof(char)); strcpy(text, arc->tile_name); @@ -270,7 +274,9 @@ Clone(Item item) } arc->line_color = ZnGetGradientByValue(arc->line_color); arc->fill_color = ZnGetGradientByValue(arc->fill_color); - arc->render_shape = NULL; + if (arc->render_shape) { + arc->render_shape = ZnListDuplicate(arc->render_shape); + } } @@ -1291,7 +1297,7 @@ Render(Item item) } } } - RenderPolyline(wi, p, num_points, arc->line_width, False, + RenderPolyline(wi, p, num_points, arc->line_width, arc->line_style, CapRound, JoinRound, first, last, arc->line_color); } |