summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorscuri <scuri>2010-05-21 04:51:07 +0000
committerscuri <scuri>2010-05-21 04:51:07 +0000
commitcc487d4de29a48d8e20a9a8492957a5950d5c181 (patch)
treeed854e4264ab307be3bd37419359bd48a39f776e /include
parent2aec4aa2e0451fd1257fd562a58e29635f979521 (diff)
*** empty log message ***
Diffstat (limited to 'include')
-rw-r--r--include/cd.h17
-rw-r--r--include/cd_private.h5
2 files changed, 21 insertions, 1 deletions
diff --git a/include/cd.h b/include/cd.h
index 8d3826c..1dc90c0 100644
--- a/include/cd.h
+++ b/include/cd.h
@@ -116,6 +116,7 @@ void cdCanvasMark(cdCanvas* canvas, int x, int y);
void cdCanvasLine(cdCanvas* canvas, int x1, int y1, int x2, int y2);
void cdCanvasBegin(cdCanvas* canvas, int mode);
void cdCanvasVertex(cdCanvas* canvas, int x, int y);
+void cdCanvasPathSet(cdCanvas* canvas, int action);
void cdCanvasEnd(cdCanvas* canvas);
void cdCanvasRect(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax);
void cdCanvasBox(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax);
@@ -271,11 +272,25 @@ enum { /* polygon mode (begin...end) */
CD_CLOSED_LINES,
CD_CLIP,
CD_BEZIER,
- CD_REGION
+ CD_REGION,
+ CD_PATH
};
#define CD_POLYCUSTOM 10
+enum { /* path actions */
+ CD_PATH_NEW,
+ CD_PATH_MOVETO,
+ CD_PATH_LINETO,
+ CD_PATH_ARC,
+ CD_PATH_CURVETO,
+ CD_PATH_CLOSE,
+ CD_PATH_FILL,
+ CD_PATH_STROKE,
+ CD_PATH_FILLSTROKE,
+ CD_PATH_CLIP
+};
+
enum { /* fill mode */
CD_EVENODD,
CD_WINDING
diff --git a/include/cd_private.h b/include/cd_private.h
index a70469c..742750e 100644
--- a/include/cd_private.h
+++ b/include/cd_private.h
@@ -215,6 +215,11 @@ struct _cdCanvas
cdfPoint* fpoly; /* used during an real poligon creation, only if ->fPoly exists */
int use_fpoly;
+ /* last path */
+ int path_n, /* current number of actions */
+ path_size; /* allocated number of actions, only increases */
+ int* path; /* used during path creation */
+
/* simulation flags */
int sim_mode;
int sim_poly;