diff options
author | scuri <scuri> | 2010-05-28 00:12:50 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-05-28 00:12:50 +0000 |
commit | c342fa4c3480daedd9580082c07cb6ad2b35a6ef (patch) | |
tree | d2f50cf8ceabcbe4e898126cf8fb9e5f5b94e555 /src/drv | |
parent | b13afc2e6f0811cc14532c4f1060bc73b6053df4 (diff) |
*** empty log message ***
Diffstat (limited to 'src/drv')
-rw-r--r-- | src/drv/cddxf.c | 4 | ||||
-rw-r--r-- | src/drv/cdpdf.c | 2 | ||||
-rw-r--r-- | src/drv/cdps.c | 2 |
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); |