41 #include "config_auto.h"
67 point_heap->
Push(&pair);
70 #ifndef GRAPHICS_DISABLED
96 vector1.
x = point2->
pos.
x - point1->
pos.
x;
97 vector1.
y = point2->
pos.
y - point1->
pos.
y;
98 vector2.
x = point3->
pos.
x - point2->
pos.
x;
99 vector2.
y = point3->
pos.
y - point2->
pos.
y;
101 length = (float)sqrt((
float)
LENGTH(vector1) *
LENGTH(vector2));
102 if ((
int) length == 0)
104 angle =
static_cast<int>(floor(asin(
CROSS (vector1, vector2) /
105 length) /
PI * 180.0 + 0.5));
108 if (
SCALAR (vector1, vector2) < 0)
132 found_better =
FALSE;
134 this_distance =
edgept_dist (critical_point, vertical_point);
135 if (this_distance <= *best_dist) {
141 *best_dist = this_distance;
142 best_point = vertical_point;
147 vertical_point = vertical_point->
next;
149 while (found_better ==
TRUE);
167 this_point = outline->
loop;
168 local_min = this_point;
169 local_max = this_point;
171 if (this_point->
vec.
y < 0) {
173 if (local_max !=
NULL)
178 local_min = this_point->
next;
180 else if (this_point->
vec.
y > 0) {
182 if (local_min !=
NULL)
187 local_max = this_point->
next;
191 if (local_max !=
NULL) {
195 local_max = this_point->
next;
202 local_min = this_point->
next;
208 this_point = this_point->
next;
210 while (this_point != outline->
loop);
276 EDGEPT_CLIST *new_points) {
279 EDGEPT_C_IT new_point_it(new_points);
280 int x = split_point->
pos.
x;
283 if (*best_point !=
NULL)
289 if (((p->
pos.
x <= x && x <= p->next->pos.x) ||
290 (p->
next->
pos.
x <= x && x <= p->pos.x)) &&
297 new_point_it.add_before_then_move(this_edgept);
300 if (*best_point ==
NULL)
301 best_dist =
edgept_dist (split_point, this_edgept);
306 *best_point = this_edgept;
311 while (p != target_point);
bool near_point(EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1, EDGEPT **near_pt)
void add_point_to_list(PointHeap *point_heap, EDGEPT *point)
void new_max_point(EDGEPT *local_max, PointHeap *points)
int direction(EDGEPT *point)
#define is_exterior_point(edge, point)
bool is_inside_angle(EDGEPT *pt)
EDGEPT * pick_close_point(EDGEPT *critical_point, EDGEPT *vertical_point, int *best_dist)
PRIORITY point_priority(EDGEPT *point)
void vertical_projection_point(EDGEPT *split_point, EDGEPT *target_point, EDGEPT **best_point, EDGEPT_CLIST *new_points)
int angle_change(EDGEPT *point1, EDGEPT *point2, EDGEPT *point3)
#define edgept_dist(p1, p2)
#define same_point(p1, p2)
void new_min_point(EDGEPT *local_min, PointHeap *points)
void prioritize_points(TESSLINE *outline, PointHeap *points)
void mark_outline(EDGEPT *edgept)