diff options
author | lecoanet | 2002-11-05 09:51:08 +0000 |
---|---|---|
committer | lecoanet | 2002-11-05 09:51:08 +0000 |
commit | 09a105503755858a5c9e9d78cf3c0349f8eea052 (patch) | |
tree | 0a361a48263b5f00bf5aa00be91441eec3f9e3c0 /generic/Types.h | |
parent | ee79858f957935d9590709971b54f0559299c16a (diff) | |
download | tkzinc-09a105503755858a5c9e9d78cf3c0349f8eea052.zip tkzinc-09a105503755858a5c9e9d78cf3c0349f8eea052.tar.gz tkzinc-09a105503755858a5c9e9d78cf3c0349f8eea052.tar.bz2 tkzinc-09a105503755858a5c9e9d78cf3c0349f8eea052.tar.xz |
Suppression dans la structure ZnPoly de holes et migration de cw dans la
structure ZnContour.
Ajout de controls � la structure ZnContour pour faire de paths.
Ajout de l'enum ZnContourCmd pour les op�rations sur les contours.
Migration de fan de la structure ZnTristrip � la structure ZnStrip
pour g�n�raliser (Tesselateur GLU).
Ajout de ZnCombineData pour assurer le support du tesselateur GLU.
Diffstat (limited to 'generic/Types.h')
-rw-r--r-- | generic/Types.h | 45 |
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) || |