aboutsummaryrefslogtreecommitdiff
path: root/generic/Types.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/Types.h')
-rw-r--r--generic/Types.h45
1 files changed, 25 insertions, 20 deletions
diff --git a/generic/Types.h b/generic/Types.h
index fec26b0..f46a4a0 100644
--- a/generic/Types.h
+++ b/generic/Types.h
@@ -47,8 +47,8 @@ extern "C" {
typedef void *ZnItemClassId;
typedef void *ZnItemId;
-typedef double ZnReal; /* Keep it a double for GPC & libart. */
-typedef int ZnBool; /* Keep it an int to keep Tk & GPC happy */
+typedef double ZnReal; /* Keep it a double for GL. */
+typedef int ZnBool; /* Keep it an int to keep Tk happy */
typedef ZnReal ZnPos;
typedef ZnReal ZnDim;
typedef XColor *ZnColor;
@@ -67,44 +67,49 @@ typedef struct {
typedef struct {
int num_points;
ZnPoint *points;
+ char *controls;
+ ZnBool cw;
} ZnContour;
/*
- * contour1/hole1 can be used to store a single contour
- * without having to alloc the holes & contours arrays.
- * The first three fields must be in sync with the gpc_polygon
- * struct when using gpc.
+ * contour1 can be used to store a single contour
+ * without having to alloc the contours array.
*/
typedef struct {
int num_contours;
- ZnBool *holes;
ZnContour *contours;
- ZnBool *cw;
- ZnBool hole1;
ZnContour contour1;
- ZnBool cw1;
} ZnPoly;
+/*
+ * Keep this enum in sync with op_strings in Contour()
+ * in tkZinc.c.
+ */
+typedef enum {
+ ZN_CONTOUR_ADD, ZN_CONTOUR_ADD_HOLE, ZN_CONTOUR_REMOVE
+} ZnContourCmd;
+
typedef struct {
int num_points;
ZnPoint *points;
+ ZnBool fan; /* When using a fan, all contour vertices must be
+ * included to describe the contour as a polygon
+ * (clipping code use that to speed up region
+ * rendering) and the center must be the first
+ * vertex. */
} ZnStrip;
-/*
- * The first two fields must be kept in sync with gpc_tristrip
- * when using gpc.
- */
typedef struct {
int num_strips;
ZnStrip *strips;
ZnStrip strip1;
- ZnBool fan; /* When using a fan, all contour vertices must be
- * included to describe the contour as a polygon
- * (clipping code use that to speed up region
- * rendering). */
- ZnPoint center;
} ZnTriStrip;
-
+
+typedef struct _ZnCombineData {
+ ZnReal v[2];
+ struct _ZnCombineData *next;
+} ZnCombineData;
+
/*
* ZnBBox: orig is into the area while corner is not.
* Thus the test: ((bbox.orig.x == bbox.corner.x) ||