diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-09-05 18:49:09 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-09-08 08:21:19 -0500 |
commit | dc45e762170a9b642af588d1c067757ae6a6c683 (patch) | |
tree | ea4a127ffadb100a1dc4e2783366041d4fdda5b1 /include/mupdf/fitz/path.h | |
parent | 3408b6a59145df4389f38ba75e095c39bc1c699e (diff) | |
download | mupdf-dc45e762170a9b642af588d1c067757ae6a6c683.tar.xz |
Separate command and coordinate arrays in fz_path structure.
Diffstat (limited to 'include/mupdf/fitz/path.h')
-rw-r--r-- | include/mupdf/fitz/path.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/include/mupdf/fitz/path.h b/include/mupdf/fitz/path.h index b2bc67ce..22b81c6e 100644 --- a/include/mupdf/fitz/path.h +++ b/include/mupdf/fitz/path.h @@ -17,14 +17,12 @@ typedef struct fz_path_s fz_path; typedef struct fz_stroke_state_s fz_stroke_state; -typedef union fz_path_item_s fz_path_item; - -typedef enum fz_path_item_kind_e +typedef enum fz_path_command_e { - FZ_MOVETO, - FZ_LINETO, - FZ_CURVETO, - FZ_CLOSE_PATH + FZ_MOVETO = 'M', + FZ_LINETO = 'L', + FZ_CURVETO = 'C', + FZ_CLOSE_PATH = 'Z', } fz_path_item_kind; typedef enum fz_linecap_e @@ -43,17 +41,15 @@ typedef enum fz_linejoin_e FZ_LINEJOIN_MITER_XPS = 3 } fz_linejoin; -union fz_path_item_s -{ - fz_path_item_kind k; - float v; -}; - struct fz_path_s { - int len, cap; - fz_path_item *items; - int last; + int cmd_len, cmd_cap; + unsigned char *cmds; + int coord_len, coord_cap; + float *coords; + fz_point current; + fz_point begin; + int last_cmd; }; struct fz_stroke_state_s |