48 float x0 = line_pt_0->
pos.
x;
49 float x1 = line_pt_1->
pos.
x;
50 float y0 = line_pt_0->
pos.
y;
51 float y1 = line_pt_1->
pos.
y;
55 p.
x =
static_cast<int16_t
>(x0);
60 slope = (y0 - y1) / (x0 - x1);
61 intercept = y1 - x1 * slope;
64 p.
x =
static_cast<int16_t
>((point->
pos.
x + (point->
pos.
y - intercept) * slope) /
66 p.
y =
static_cast<int16_t
>(slope * p.
x + intercept);
75 *near_pt =
closest(point, line_pt_0, line_pt_1);
#define closest(test_p, p1, p2)
bool near_point(EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1, EDGEPT **near_pt)
EDGEPT * make_edgept(int x, int y, EDGEPT *next, EDGEPT *prev)
#define same_point(p1, p2)
#define is_on_line(p, p0, p1)