comparison plugins/gestures/stroke.c @ 12551:a22381c9072d

[gaim-migrate @ 14869] warn_unused_result found these committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 18 Dec 2005 20:56:42 +0000
parents 19fd43d52d18
children
comparison
equal deleted inserted replaced
12550:7f0f68ae1f5a 12551:a22381c9072d
231 iy += fabs(((float) dely / (float) delx)) * (float) ((dely < 0) ? -1.0 : 1.0); 231 iy += fabs(((float) dely / (float) delx)) * (float) ((dely < 0) ? -1.0 : 1.0);
232 232
233 /* add the interpolated point */ 233 /* add the interpolated point */
234 new_point_p->x = ix; 234 new_point_p->x = ix;
235 new_point_p->y = iy; 235 new_point_p->y = iy;
236 g_slist_append (metrics->pointList, new_point_p); 236 metrics->pointList = g_slist_append (metrics->pointList, new_point_p);
237 237
238 /* update metrics */ 238 /* update metrics */
239 if (((gint) ix) < metrics->min_x) metrics->min_x = (gint) ix; 239 if (((gint) ix) < metrics->min_x) metrics->min_x = (gint) ix;
240 if (((gint) ix) > metrics->max_x) metrics->max_x = (gint) ix; 240 if (((gint) ix) > metrics->max_x) metrics->max_x = (gint) ix;
241 if (((gint) iy) < metrics->min_y) metrics->min_y = (gint) iy; 241 if (((gint) iy) < metrics->min_y) metrics->min_y = (gint) iy;
255 ix += fabs(((float) delx / (float) dely)) * (float) ((delx < 0) ? -1.0 : 1.0); 255 ix += fabs(((float) delx / (float) dely)) * (float) ((delx < 0) ? -1.0 : 1.0);
256 256
257 /* add the interpolated point */ 257 /* add the interpolated point */
258 new_point_p->y = iy; 258 new_point_p->y = iy;
259 new_point_p->x = ix; 259 new_point_p->x = ix;
260 g_slist_append(metrics->pointList, new_point_p); 260 metrics->pointList = g_slist_append(metrics->pointList, new_point_p);
261 261
262 /* update metrics */ 262 /* update metrics */
263 if (((gint) ix) < metrics->min_x) metrics->min_x = (gint) ix; 263 if (((gint) ix) < metrics->min_x) metrics->min_x = (gint) ix;
264 if (((gint) ix) > metrics->max_x) metrics->max_x = (gint) ix; 264 if (((gint) ix) > metrics->max_x) metrics->max_x = (gint) ix;
265 if (((gint) iy) < metrics->min_y) metrics->min_y = (gint) iy; 265 if (((gint) iy) < metrics->min_y) metrics->min_y = (gint) iy;
269 new_point_p = (p_point) malloc (sizeof(struct s_point)); 269 new_point_p = (p_point) malloc (sizeof(struct s_point));
270 } 270 }
271 } 271 }
272 272
273 /* add the sampled point */ 273 /* add the sampled point */
274 g_slist_append(metrics->pointList, new_point_p); 274 metrics->pointList = g_slist_append(metrics->pointList, new_point_p);
275 } 275 }
276 276
277 /* record the sampled point values */ 277 /* record the sampled point values */
278 new_point_p->x = x; 278 new_point_p->x = x;
279 new_point_p->y = y; 279 new_point_p->y = y;