#ifndef _LEO_LABELLER_H
#define _LEO_LABELLER_H
-enum label_type
-{
- LABEL_POINT,
- LABEL_LINE,
- LABEL_AREA,
-};
-
enum request_type
{
+ REQUEST_INVALID,
REQUEST_POINT,
- REQUEST_AREALABEL,
- REQUEST_LINELABEL,
+ REQUEST_AREA,
+ REQUEST_LINE,
REQUEST_SEGMENT,
};
TERM_COND_ITERATIONS,
};
-struct sym_placement
-{
- double x;
- double y;
- int variant;
- struct request *request;
-};
-
-struct request
-{
- enum request_type type;
- int ind;
-};
-
struct point_variant
{
double width;
bool *masks;
};
+struct request
+{
+ enum request_type type;
+ int ind;
+};
+
struct request_point
{
struct request request;
struct symbol *sym;
- struct osm_object *object; // FIXME: Linked also by sym
z_index_t zindex;
double x;
double y;
double y2;
double k;
struct sym_line *sym;
+ struct symbol *label;
struct point_variant *variant;
- struct sym_text *text;
z_index_t zindex;
};
struct request_line
{
struct request request;
- struct symbol *sym;
+ struct symbol *line;
int num_variants;
int num_segments;
struct line_variant *variants;
{
struct request request;
struct osm_multipolygon *o;
- struct sym_text *sym;
- struct point_variant *text_variant;
+ struct symbol *label;
+ struct point_variant *variants;
z_index_t zindex;
+ double cx, cy;
};
struct buffer_line
struct buffer_linelabel
{
struct osm_way *way;
- struct sym_text *text;
+ struct symbol *label;
z_index_t zindex;
};
struct graph_node *n1;
struct graph_node *n2;
uns longline;
- struct sym_text *text;
- struct sym_line *sym;
+ struct symbol *label;
+ struct sym_line *line;
z_index_t zindex;
int dir;
struct graph_node *anode;
struct placement
{
+ struct request *request;
double x;
double y;
int variant_used;
bool processed;
- struct request *request;
};
struct map_part