git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed a few bugs in remove_font_transforms filter
[swftools.git]
/
lib
/
gfxpoly
/
poly.h
diff --git
a/lib/gfxpoly/poly.h
b/lib/gfxpoly/poly.h
index
fc825b4
..
68eec9b
100644
(file)
--- a/
lib/gfxpoly/poly.h
+++ b/
lib/gfxpoly/poly.h
@@
-6,7
+6,7
@@
#include "../types.h"
//#define DEBUG
#include "../types.h"
//#define DEBUG
-#define CHECKS
+//#define CHECKS
/* features */
#define SPLAY
/* features */
#define SPLAY
@@
-16,13
+16,15
@@
typedef enum {DIR_UP, DIR_DOWN, DIR_UNKNOWN} segment_dir_t;
typedef enum {EVENT_CROSS, EVENT_END, EVENT_START, EVENT_HORIZONTAL} eventtype_t;
typedef enum {SLOPE_POSITIVE, SLOPE_NEGATIVE} slope_t;
typedef enum {EVENT_CROSS, EVENT_END, EVENT_START, EVENT_HORIZONTAL} eventtype_t;
typedef enum {SLOPE_POSITIVE, SLOPE_NEGATIVE} slope_t;
+#define INVALID_COORD (0x7fffffff)
typedef struct _point {
int32_t x;
int32_t y;
} point_t;
typedef struct _point {
int32_t x;
int32_t y;
} point_t;
+type_t point_type;
typedef struct _fillstyle {
typedef struct _fillstyle {
- char is_filled;
+ void*internal;
} fillstyle_t;
typedef struct _windstate
} fillstyle_t;
typedef struct _windstate
@@
-48,6
+50,7
@@
typedef struct _windrule
typedef struct _gfxpolystroke {
segment_dir_t dir;
typedef struct _gfxpolystroke {
segment_dir_t dir;
+ int points_size;
int num_points;
point_t*points;
fillstyle_t*fs;
int num_points;
point_t*points;
fillstyle_t*fs;
@@
-114,10
+117,14
@@
typedef struct _segment {
void gfxpoly_fail(char*expr, char*file, int line, const char*function);
char gfxpoly_check(gfxpoly_t*poly);
void gfxpoly_fail(char*expr, char*file, int line, const char*function);
char gfxpoly_check(gfxpoly_t*poly);
+int gfxpoly_num_segments(gfxpoly_t*poly);
int gfxpoly_size(gfxpoly_t*poly);
void gfxpoly_dump(gfxpoly_t*poly);
void gfxpoly_save(gfxpoly_t*poly, const char*filename);
int gfxpoly_size(gfxpoly_t*poly);
void gfxpoly_dump(gfxpoly_t*poly);
void gfxpoly_save(gfxpoly_t*poly, const char*filename);
-gfxpoly_t* gfxpoly_process(gfxpoly_t*poly, windrule_t*windrule, windcontext_t*context);
+gfxpoly_t* gfxpoly_process(gfxpoly_t*poly1, gfxpoly_t*poly2, windrule_t*windrule, windcontext_t*context);
+
+gfxpoly_t* gfxpoly_intersect(gfxpoly_t*p1, gfxpoly_t*p2);
+gfxpoly_t* gfxpoly_union(gfxpoly_t*p1, gfxpoly_t*p2);
#ifndef CHECKS
#ifdef assert
#ifndef CHECKS
#ifdef assert