summaryrefslogtreecommitdiff
path: root/src/drv
diff options
context:
space:
mode:
Diffstat (limited to 'src/drv')
-rw-r--r--src/drv/cddxf.c4
-rw-r--r--src/drv/cdpdf.c2
-rw-r--r--src/drv/cdps.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/src/drv/cddxf.c b/src/drv/cddxf.c
index f8c9a28..c5d0df5 100644
--- a/src/drv/cddxf.c
+++ b/src/drv/cddxf.c
@@ -683,6 +683,7 @@ static void cdarc (cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double
bulge = calc_bulge (a, b, t, t+seg_angle); /* and t+seg_angle and write */
writevertex (ctxcanvas, xc, yc, a, b, t, bulge); /* vertex at t */
}
+
writevertex (ctxcanvas, xc, yc, a, b, t2, 0); /* bulge of last vertex is useless */
fprintf ( ctxcanvas->file, "0\n" );
@@ -731,12 +732,15 @@ static void cdsector (cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, doub
if ((a2-a1) != 360)
writevertex (ctxcanvas, xc, yc, 0, 0, 0, 0); /* center */
+
for (i=0, t=t1; i<nseg; i++, t+=seg_angle)
{ /* calculate bulge between t */
bulge = calc_bulge (a, b, t, t+seg_angle); /* and t+seg_angle and write */
writevertex (ctxcanvas, xc, yc, a, b, t, bulge); /* vertex at t */
}
+
writevertex (ctxcanvas, xc, yc, a, b, t2, 0); /* bulge of last vertex is useless */
+
if ((a2-a1) != 360)
writevertex (ctxcanvas, xc, yc, 0, 0, 0, 0); /* center */
diff --git a/src/drv/cdpdf.c b/src/drv/cdpdf.c
index 4614568..2c48d50 100644
--- a/src/drv/cdpdf.c
+++ b/src/drv/cdpdf.c
@@ -328,6 +328,8 @@ static void cdfarc(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, doubl
{
sUpdateFill(ctxcanvas, 0);
+ /* angles in degrees counterclockwise, same as CD */
+
if (w==h)
{
PDF_arc(ctxcanvas->pdf, xc, yc, 0.5*w, a1, a2);
diff --git a/src/drv/cdps.c b/src/drv/cdps.c
index ce45397..b651994 100644
--- a/src/drv/cdps.c
+++ b/src/drv/cdps.c
@@ -624,6 +624,8 @@ static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a
{
sUpdateFill(ctxcanvas, 0);
+ /* angles in degrees counterclockwise, same as CD */
+
if (w==h) /* Circulo: PS implementa direto */
{
fprintf(ctxcanvas->file, "N %d %d %g %g %g arc S\n", xc, yc, 0.5*w, a1, a2);