summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/page.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/page.c b/src/page.c
index 5156430..c5ea8b8 100644
--- a/src/page.c
+++ b/src/page.c
@@ -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;