diff options
author | Vincent Sanders <vince@kyllikki.org> | 2018-02-05 00:06:44 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2018-02-05 00:06:44 +0000 |
commit | c4dd67804afc84fde84402649e5b32f2b00680c3 (patch) | |
tree | 3032045d1a6f4da180de13cf14b91e46936b95ad /src/page.c | |
parent | 4a18ec928fa6e6e2231fcef76e91eb1a4d57f588 (diff) | |
download | libnspdf-c4dd67804afc84fde84402649e5b32f2b00680c3.tar.gz libnspdf-c4dd67804afc84fde84402649e5b32f2b00680c3.tar.bz2 |
fix emiting beziers
Diffstat (limited to 'src/page.c')
-rw-r--r-- | src/page.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -277,6 +277,19 @@ render_operation_l(struct content_operation *operation, struct graphics_state *g } static inline nspdferror +render_operation_c(struct content_operation *operation, struct graphics_state *gs) +{ + gs->path[gs->path_idx++] = NSPDF_PATH_BEZIER; + gs->path[gs->path_idx++] = operation->u.number[0]; + gs->path[gs->path_idx++] = operation->u.number[1]; + gs->path[gs->path_idx++] = operation->u.number[2]; + gs->path[gs->path_idx++] = operation->u.number[3]; + gs->path[gs->path_idx++] = operation->u.number[4]; + gs->path[gs->path_idx++] = operation->u.number[5]; + return NSPDFERROR_OK; +} + +static inline nspdferror render_operation_re(struct content_operation *operation, struct graphics_state *gs) { gs->path[gs->path_idx++] = NSPDF_PATH_MOVE; @@ -485,6 +498,10 @@ nspdf_page_render(struct nspdf_doc *doc, res = render_operation_re(operation, &gs); break; + case CONTENT_OP_c: /* curve */ + res = render_operation_c(operation, &gs); + break; + case CONTENT_OP_h: /* close path */ res = render_operation_h(&gs); break; |