From ec14ac908fd8c0b8b21f4ef456cbc7d9dac890fa Mon Sep 17 00:00:00 2001 From: lecoanet Date: Mon, 13 Nov 2000 09:01:16 +0000 Subject: La visibilit� est renseign�e dans le retour de SendTrackToOm (correction bug). --- generic/Track.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'generic/Track.c') diff --git a/generic/Track.c b/generic/Track.c index 69121b8..f61c661 100644 --- a/generic/Track.c +++ b/generic/Track.c @@ -1015,7 +1015,6 @@ ToArea(Item item, * ********************************************************************************** */ - static void Draw(Item item) { @@ -1215,6 +1214,22 @@ Draw(Item item) /* ********************************************************************************** * + * Render -- + * + ********************************************************************************** + */ +static void +Render(Item item) +{ + /* WidgetInfo *wi = item->wi; + TrackItem track = (TrackItem) item;*/ + +} + + +/* + ********************************************************************************** + * * IsSensitive -- * ********************************************************************************** @@ -1418,10 +1433,10 @@ SendTrackToOm(void *ptr, int *y, int *sv_dx, int *sv_dy, - int *label_x, + /* int *label_x, int *label_y, int *label_width, - int *label_height, + int *label_height,*/ int *rho, int *theta, int *visibility) @@ -1466,7 +1481,8 @@ SendTrackToOm(void *ptr, */ *sv_dx = track->speed_vector.x; *sv_dy = track->speed_vector.y; - + + /* Fri Oct 13 15:16:38 2000 *label_x = track->field_set.label_pos.x; *label_y = wi->height - track->field_set.label_pos.y; if (track->field_set.label_format) { @@ -1480,8 +1496,10 @@ SendTrackToOm(void *ptr, *label_width = 0; *label_height = 0; } + */ *rho = sqrt(track->label_dx*track->label_dx + track->label_dy*track->label_dy); *theta = track->label_angle; + *visibility = ISSET(current_item->flags, VISIBLE_BIT); break; } @@ -1510,6 +1528,7 @@ SetLabelAngleFromOm(void *ptr, /* No longer in use. */ if ((theta >= 0) && (track->label_angle != theta)) { track->label_angle = theta; + SET(track->flags, POLAR_BIT); ITEM.Invalidate((Item) item, ZN_COORDS_FLAG); } } @@ -1697,7 +1716,7 @@ Part(Item item, Tcl_Obj **part_spec, int *part) { - char *part_str; + char *part_str=""; int c; char *end; @@ -1802,6 +1821,7 @@ static ItemClassStruct TRACK_ITEM_CLASS = { ComputeCoordinates, ToArea, Draw, + Render, IsSensitive, Pick, NULL, /* PickVertex */ @@ -1834,6 +1854,7 @@ static ItemClassStruct WAY_POINT_ITEM_CLASS = { ComputeCoordinates, ToArea, Draw, + Render, IsSensitive, Pick, NULL, /* PickVertex */ -- cgit v1.1