summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorscuri <scuri>2010-06-17 19:32:24 +0000
committerscuri <scuri>2010-06-17 19:32:24 +0000
commitdebc9599032c7036006ec124f4ef8f44b8935568 (patch)
tree0e210330658dc789212f1292f23bf6079f66fb81 /src
parent622702f609550390898cd31956bf784212f46a6e (diff)
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/drv/cdpdf.c6
-rw-r--r--src/drv/cdps.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/drv/cdpdf.c b/src/drv/cdpdf.c
index 58cf474..3211cba 100644
--- a/src/drv/cdpdf.c
+++ b/src/drv/cdpdf.c
@@ -876,7 +876,7 @@ static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n)
static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style)
{
- double mm = (72.0/25.4) / ctxcanvas->scale;
+ double mm = ctxcanvas->canvas->xres;
char options[200];
switch (style)
@@ -901,12 +901,12 @@ static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style)
case CD_CUSTOM :
{
int i;
-
+ /* size here is in pixels, do not use mm */
strcpy(options, "dasharray={");
for (i = 0; i < ctxcanvas->canvas->line_dashes_count; i++)
{
char tmp[80];
- sprintf(tmp, "%g ", ctxcanvas->canvas->line_dashes[i]*mm);
+ sprintf(tmp, "%g ", (double)ctxcanvas->canvas->line_dashes[i]);
strcat(options, tmp);
}
strcat(options, "}");
diff --git a/src/drv/cdps.c b/src/drv/cdps.c
index 37bdef6..08d6ba7 100644
--- a/src/drv/cdps.c
+++ b/src/drv/cdps.c
@@ -1454,7 +1454,7 @@ static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n)
static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style)
{
- double mm = (72.0/25.4) / ctxcanvas->scale;
+ double mm = ctxcanvas->canvas->xres;
if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdLineStyle %d Begin\n", style);
@@ -1479,9 +1479,9 @@ static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style)
break;
case CD_CUSTOM :
{
- int i;
+ int i; /* size here is in pixels, do not use mm */
for (i = 0; i < ctxcanvas->canvas->line_dashes_count; i++)
- fprintf(ctxcanvas->file, "%g ", ctxcanvas->canvas->line_dashes[i]*mm);
+ fprintf(ctxcanvas->file, "%g ", (double)ctxcanvas->canvas->line_dashes[i]);
}
break;
}