69 data.
Data = (
char *) point;
74 #ifndef GRAPHICS_DISABLED
95 vector1.
x = point2->
pos.
x - point1->
pos.
x;
96 vector1.
y = point2->
pos.
y - point1->
pos.
y;
97 vector2.
x = point3->
pos.
x - point2->
pos.
x;
98 vector2.
y = point3->
pos.
y - point2->
pos.
y;
100 length = (float)sqrt((
float)
LENGTH(vector1) *
LENGTH(vector2));
101 if ((
int) length == 0)
103 angle =
static_cast<int>(floor(asin(
CROSS (vector1, vector2) /
104 length) /
PI * 180.0 + 0.5));
107 if (
SCALAR (vector1, vector2) < 0)
190 found_better =
FALSE;
192 this_distance =
edgept_dist (critical_point, vertical_point);
193 if (this_distance <= *best_dist) {
199 *best_dist = this_distance;
200 best_point = vertical_point;
205 vertical_point = vertical_point->
next;
207 while (found_better ==
TRUE);
225 this_point = outline->
loop;
226 local_min = this_point;
227 local_max = this_point;
229 if (this_point->
vec.
y < 0) {
231 if (local_max !=
NULL)
236 local_min = this_point->
next;
238 else if (this_point->
vec.
y > 0) {
240 if (local_min !=
NULL)
245 local_max = this_point->
next;
249 if (local_max !=
NULL) {
253 local_max = this_point->
next;
260 local_min = this_point->
next;
266 this_point = this_point->
next;
268 while (this_point != outline->
loop);
334 EDGEPT_CLIST *new_points) {
337 EDGEPT_C_IT new_point_it(new_points);
338 int x = split_point->
pos.
x;
341 if (*best_point !=
NULL)
347 if ((((p->
pos.
x <= x) && (x <= p->next->pos.x)) ||
348 ((p->
next->
pos.
x <= x) && (x <= p->pos.x))) &&
354 new_point_it.add_before_then_move(this_edgept);
357 if (*best_point ==
NULL)
358 best_dist =
edgept_dist (split_point, this_edgept);
363 *best_point = this_edgept;
368 while (p != target_point);
void mark_outline(EDGEPT *edgept)
int angle_change(EDGEPT *point1, EDGEPT *point2, EDGEPT *point3)
void add_point_to_list(POINT_GROUP point_list, EDGEPT *point)
#define is_inside_angle(pt)
bool near_point(EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1, EDGEPT **near_pt)
int is_little_chunk(EDGEPT *point1, EDGEPT *point2)
int chop_min_outline_points
EDGEPT * pick_close_point(EDGEPT *critical_point, EDGEPT *vertical_point, int *best_dist)
void new_min_point(EDGEPT *local_min, POINT_GROUP points)
int is_small_area(EDGEPT *point1, EDGEPT *point2)
#define edgept_dist(p1, p2)
void prioritize_points(TESSLINE *outline, POINT_GROUP points)
int chop_min_outline_area
void HeapStore(HEAP *Heap, HEAPENTRY *Entry)
void vertical_projection_point(EDGEPT *split_point, EDGEPT *target_point, EDGEPT **best_point, EDGEPT_CLIST *new_points)
#define is_exterior_point(edge, point)
#define same_point(p1, p2)
PRIORITY point_priority(EDGEPT *point)
void new_max_point(EDGEPT *local_max, POINT_GROUP points)
int direction(EDGEPT *point)
int is_same_edgept(EDGEPT *p1, EDGEPT *p2)