diff options
author | neoraider <devnull@localhost> | 2007-06-25 18:55:01 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-06-25 18:55:01 +0200 |
commit | b8549034bef0de090547f32af07df248e68c7064 (patch) | |
tree | 2cf8128807a5d9e4b53e1461492b4930a2743ad3 /geometry.h | |
parent | a686a31daece494006e3ce841a5883472a0f412a (diff) | |
download | zoomedit-b8549034bef0de090547f32af07df248e68c7064.tar zoomedit-b8549034bef0de090547f32af07df248e68c7064.zip |
zoomedit: Added Pixmap to drawing; added "point in polygon" checker; rooms are now selectable
Diffstat (limited to 'geometry.h')
-rw-r--r-- | geometry.h | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -2,6 +2,8 @@ #define GEOMETRY_H_ +#include <glib.h> + #define EDGE_NONE 0 #define EDGE_LEFT (1<<0) #define EDGE_RIGHT (1<<1) @@ -9,13 +11,14 @@ #define EDGE_BOTTOM (1<<3) #define EDGE_ALL (EDGE_LEFT|EDGE_RIGHT|EDGE_TOP|EDGE_BOTTOM) -#define INTERSECTION_ERROR -1 -#define INTERSECTION_NONE 0 -#define INTERSECTION_IDENTICAL 1 -#define INTERSECTION_LINE_LINE 2 -#define INTERSECTION_LINE_SEGMENT 3 -#define INTERSECTION_SEGMENT_LINE 4 -#define INTERSECTION_SEGMENT_SEGMENT 5 +#define INTERSECTION_ERROR -1 +#define INTERSECTION_NONE 0 +#define INTERSECTION_IDENTICAL 1 +#define INTERSECTION_LINE 2 +#define INTERSECTION_LINE_LINE 2 +#define INTERSECTION_LINE_SEGMENT 3 +#define INTERSECTION_SEGMENT_LINE 6 +#define INTERSECTION_SEGMENT_SEGMENT 7 typedef struct _VERTEX { @@ -42,6 +45,7 @@ void deleteVertex(VERTEX_LIST *list, unsigned int n); int vertexInRect(const VERTEX *v, const RECTANGLE *rect); +gboolean vertexInPolygon(const VERTEX *v, const POLYGON *p); int lineIntersection(const LINE *la, const LINE *lb, VERTEX *v); int lineRectIntersection(const LINE *l, const RECTANGLE *rect, int edge, VERTEX *v); int lineRectIntersections(const LINE *line, const RECTANGLE *rect, int edge, VERTEX *v1, VERTEX *v2); |