Home | History | Annotate | Download | only in vega

Lines Matching full:points

293 static INLINE VGboolean is_bezier_line(float (*points)[2], int count)
295 float dx13 = points[2][0] - points[0][0];
296 float dy13 = points[2][1] - points[0][1];
298 float dx12 = points[1][0] - points[0][0];
299 float dy12 = points[1][1] - points[0][1];
306 float dx14 = points[3][0] - points[0][0];
307 float dy14 = points[3][1] - points[0][1];
340 float points[4][2];
346 points[np][0] = orig->x1;
347 points[np][1] = orig->y1;
351 points[np][0] = orig->x2;
352 points[np][1] = orig->y2;
357 points[np][0] = orig->x3;
358 points[np][1] = orig->y3;
363 points[np][0] = orig->x4;
364 points[np][1] = orig->y4;
371 /* We need to specialcase lines of 3 or 4 points due to numerical
373 if (np > 2 && is_bezier_line(points, np)) {
374 float l[4] = { points[0][0], points[0][1],
375 points[np-1][0], points[np-1][1] };
377 if (floatsEqual(points[0][0], points[np-1][0]) &&
378 floatsEqual(points[0][1], points[np-1][1]))
399 /* the points are close and reverse dirction. Approximate the whole
404 compute_pt_normal(points[0], points[1], prev_normal);
406 points_shifted[0][0] = points[0][0] + offset * prev_normal[0];
407 points_shifted[0][1] = points[0][1] + offset * prev_normal[1];
412 compute_pt_normal(points[i], points[i + 1], next_normal);
421 points_shifted[i][0] = points[i][0] + offset * prev_normal[0];
422 points_shifted[i][1] = points[i][1] + offset * prev_normal[1];
425 points_shifted[i][0] = points[i][0] + k * normal_sum[0];
426 points_shifted[i][1] = points[i][1] + k * normal_sum[1];
433 points_shifted[np - 1][0] = points[np - 1][0] + offset * prev_normal[0];
434 points_shifted[np - 1][1] = points[np - 1][1] + offset * prev_normal[1];