From 9663a916b72352db78f2d17d5268c1018904f967 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Thu, 11 May 2000 13:56:44 +0000 Subject: Adaptation suite � la r�alisation des polygones multi-contours. Correction d'un bug emp�chant l'antirec ailleurs que dans le topgroup. --- generic/Track.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'generic') diff --git a/generic/Track.c b/generic/Track.c index 742274d..b3051db 100644 --- a/generic/Track.c +++ b/generic/Track.c @@ -945,7 +945,7 @@ ToArea(Item item, if (track->leader_first_end != NULL) { GetLineEnd(&points[0], &points[1], track->leader_width, CapRound, track->leader_first_end, end_points); - if (PolygonInBBox(end_points, LINE_END_POINTS, area) != inside) { + if (PolygonInBBox(end_points, LINE_END_POINTS, area, NULL) != inside) { /*printf("track leader\n");*/ return 0; } @@ -953,7 +953,7 @@ ToArea(Item item, if (track->leader_last_end != NULL) { GetLineEnd(&points[num_points-1], &points[num_points-2], track->leader_width, CapRound, track->leader_last_end, end_points); - if (PolygonInBBox(end_points, LINE_END_POINTS, area) != inside) { + if (PolygonInBBox(end_points, LINE_END_POINTS, area, NULL) != inside) { /*printf("track leader\n");*/ return 0; } @@ -1412,7 +1412,7 @@ SendTrackToOm(void *ptr, zn_bbox.corner.y = wi->height; if (current_item == ZN_NO_ITEM) { - current_item = ((GroupItem) wi->top_group)->head; + current_item = ((GroupItem) wi->om_group)->head; } else { current_item = current_item->next; @@ -1625,6 +1625,7 @@ GetAnchor(Item item, */ static int Coords(Item item, + int contour, int index, int cmd, ZnPoint **pts, @@ -1667,9 +1668,9 @@ Coords(Item item, */ static ItemClassStruct TRACK_ITEM_CLASS = { sizeof(TrackItemStruct), - True, - True, - True, + True, /* has_fields */ + True, /* has_parts */ + True, /* has_anchors */ "track", track_attrs, Init, @@ -1679,21 +1680,23 @@ static ItemClassStruct TRACK_ITEM_CLASS = { Query, GetFieldSet, GetAnchor, - NULL, + NULL, /* GetClipVertices */ Coords, + NULL, /* Contour */ ComputeCoordinates, ToArea, Draw, IsSensitive, Pick, + NULL, /* PickVertex */ PostScript }; static ItemClassStruct WAY_POINT_ITEM_CLASS = { sizeof(TrackItemStruct), - True, - True, - True, + True, /* has_fields */ + True, /* has_parts */ + True, /* has_anchors */ "waypoint", wp_attrs, Init, @@ -1703,13 +1706,15 @@ static ItemClassStruct WAY_POINT_ITEM_CLASS = { Query, GetFieldSet, GetAnchor, - NULL, + NULL, /* GetClipVertices */ Coords, + NULL, /* Contour */ ComputeCoordinates, ToArea, Draw, IsSensitive, Pick, + NULL, /* PickVertex */ PostScript }; -- cgit v1.1