Lines Matching refs:p2
1330 TkGetMiterPoints(p1, p2, p3, width, m1, m2)
1333 double p2[]; /* Points to x- and y-coordinates of vertex
1339 * point (see as you face from p1 to p2). */
1343 double theta1; /* Angle of segment p2-p1. */
1344 double theta2; /* Angle of segment p2-p3. */
1349 double dist; /* Distance of miter points from p2. */
1364 p2x = floor(p2[0]+0.5);
1365 p2y = floor(p2[1]+0.5);
1399 * looking from p1 to p2).
1431 * p1 *---------------* p2
1435 * M1 and m2 will be W units apart, with p2 centered between
1436 * them and m1-m2 perpendicular to p1-p2. However, if
1440 * p2 |
1445 * In this case p2 will be width/2 units from the segment m1-m2.
1454 TkGetButtPoints(p1, p2, width, project, m1, m2)
1457 double p2[]; /* Points to x- and y-coordinates of vertex
1460 int project; /* Non-zero means project p2 by an additional
1463 * point, as you face from p1 to p2. */
1467 double length; /* Length of p1-p2 segment. */
1471 length = hypot(p2[0] - p1[0], p2[1] - p1[1]);
1473 m1[0] = m2[0] = p2[0];
1474 m1[1] = m2[1] = p2[1];
1476 deltaX = -width * (p2[1] - p1[1]) / length;
1477 deltaY = width * (p2[0] - p1[0]) / length;
1478 m1[0] = p2[0] + deltaX;
1479 m2[0] = p2[0] - deltaX;
1480 m1[1] = p2[1] + deltaY;
1481 m2[1] = p2[1] - deltaY;