[dia] pstricks: fixed linestyles for dash-dot and dash-dot-dot



commit 662ba659d483ddd01667065de6dace52214eb235
Author: Hans Breuer <hans breuer org>
Date:   Fri May 2 18:00:10 2014 +0200

    pstricks: fixed linestyles for dash-dot and dash-dot-dot
    
    Formerly these were breaking the rendering altogether, now only the
    text rendering has still issues.

 plug-ins/pstricks/render_pstricks.c |   20 ++++++--------------
 samples/pst-test.tex                |   13 +++++++------
 2 files changed, 13 insertions(+), 20 deletions(-)
---
diff --git a/plug-ins/pstricks/render_pstricks.c b/plug-ins/pstricks/render_pstricks.c
index b85cb3b..2df0a89 100644
--- a/plug-ins/pstricks/render_pstricks.c
+++ b/plug-ins/pstricks/render_pstricks.c
@@ -339,32 +339,24 @@ set_linestyle(DiaRenderer *self, LineStyle mode)
     case LINESTYLE_DASHED:
        pstricks_dtostr(dash_length_buf,renderer->dash_length);
        fprintf(renderer->file, "\\psset{linestyle=dashed,dash=%s %s}\n", 
-               dash_length_buf,
-               dash_length_buf);
+               dash_length_buf, dash_length_buf);
        break;
     case LINESTYLE_DASH_DOT:
        hole_width = (renderer->dash_length - renderer->dot_length) / 2.0;
        pstricks_dtostr(hole_width_buf,hole_width);
        pstricks_dtostr(dot_length_buf,renderer->dot_length);
        pstricks_dtostr(dash_length_buf,renderer->dash_length);
-       fprintf(renderer->file, "\\linestyleddashdotted{%s %s %s %s}\n",
-               dash_length_buf,
-               hole_width_buf,
-               dot_length_buf,
-               hole_width_buf );
+       fprintf(renderer->file, "\\psset{linestyle=dashed,dash=%s %s %s %s}\n",
+               dash_length_buf, hole_width_buf, dot_length_buf, hole_width_buf );
        break;
     case LINESTYLE_DASH_DOT_DOT:
        hole_width = (renderer->dash_length - 2.0*renderer->dot_length) / 3.0;
        pstricks_dtostr(hole_width_buf,hole_width);
        pstricks_dtostr(dot_length_buf,renderer->dot_length);
        pstricks_dtostr(dash_length_buf,renderer->dash_length);
-       fprintf(renderer->file, "\\linestyleddashdotdotted{%s %s %s %s %s %s}\n",
-               dash_length_buf,
-               hole_width_buf,
-               dot_length_buf,
-               hole_width_buf,
-               dot_length_buf,
-               hole_width_buf );
+       fprintf(renderer->file, "\\psset{linestyle=dashed,dash=%s %s %s %s %s %s}\n",
+               dash_length_buf, hole_width_buf, dot_length_buf, hole_width_buf,
+               dot_length_buf, hole_width_buf );
        break;
     case LINESTYLE_DOTTED:
        pstricks_dtostr(dot_length_buf,renderer->dot_length);
diff --git a/samples/pst-test.tex b/samples/pst-test.tex
index 24c2f61..927635e 100644
--- a/samples/pst-test.tex
+++ b/samples/pst-test.tex
@@ -2,14 +2,15 @@
 \documentclass[landscape]{article}
 \usepackage[pdf]{pstricks}
 \usepackage[crop=off]{auto-pst-pdf}
-\title{Dia Export Test}
+\title{Dia Pstricks Export Test}
 \author{Hans Breuer}
 \begin{document}
 \maketitle
-\include{convert-to-path.pst}
+%\include{convert-to-path.pst}
 %\include{jigsaw.pst}
-% while the former files had clipping issues render-test does not
-% produce any visible result within in this setup, not even single
-% layers of it
-%\include{render-test.pst}
+% All the files have clipping issues render-test did not produce any
+% visible result within in this setup, due dash-dot-dot errors
+% After that fixed still only a single included file can be included
+% reliable on windows with TeXworks:pdfLatex ...
+\include{render-test.pst}
 \end{document}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]