diff options
-rw-r--r-- | pcl/pgdraw.c | 19 | ||||
-rw-r--r-- | pcl/pgvector.c | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/pcl/pgdraw.c b/pcl/pgdraw.c index 28faf7d6d..107434c34 100644 --- a/pcl/pgdraw.c +++ b/pcl/pgdraw.c @@ -1245,17 +1245,18 @@ hpgl_add_bezier_to_path(hpgl_state_t *pgls, floatp x1, floatp y1, floatp x2, floatp y2, floatp x3, floatp y3, floatp x4, floatp y4, hpgl_plot_function_t draw) { + if ( !pgls->g.polygon_mode ) hpgl_call(hpgl_add_point_to_path(pgls, x1, y1, hpgl_plot_move_absolute, true)); - if ( draw ) - hpgl_call(gs_curveto(pgls->pgs, x2, y2, x3, y3, x4, y4)); - /* update hpgl's state position to last point of the curve. */ - { - gs_point point; - point.x = x4; point.y = y4; - hpgl_call(hpgl_set_current_position(pgls, &point)); - } - return 0; + if ( draw ) + hpgl_call(gs_curveto(pgls->pgs, x2, y2, x3, y3, x4, y4)); + /* update hpgl's state position to last point of the curve. */ + { + gs_point point; + point.x = x4; point.y = y4; + hpgl_call(hpgl_set_current_position(pgls, &point)); + } + return 0; } /* diff --git a/pcl/pgvector.c b/pcl/pgvector.c index 4f0704363..052441b6e 100644 --- a/pcl/pgvector.c +++ b/pcl/pgvector.c @@ -101,7 +101,7 @@ hpgl_bezier(hpgl_args_t *pargs, hpgl_state_t *pgls, bool relative) /* We must clear the current path since we cannot properly join lines to curves with the current line drawing machinery */ - if ( pargs->phase == 0 ) { + if ( ( pargs->phase == 0 ) && ( !pgls->g.polygon_mode ) ) { hpgl_call(hpgl_clear_current_path(pgls)); pargs->phase = 1; } |