GNOME Bugzilla – Bug 304974
Text position error in the exported Tex PSTrick file
Last modified: 2006-01-14 16:08:07 UTC
Distribution/Version: XP I am using Dia 0.94 in drawing diagram then exporting them to Tex PsTrick file. I found that the exported Tex file has a problem: When add text object in the diagram, the y-coordinate of the text object in the exported PsTrick script is wrong. We must add a negative sign before its y- corrdinate to get correct result. This is a example: ........ \newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000} \psset{linecolor=dialinecolor} \rput[l](15.000000,12.400000){\scalebox{1 -1}{$y^2_i(k)$}} \setfont{Helvetica}{0.800000} \newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000} \psset{linecolor=dialinecolor} \rput[l](3.495000,9.295000){\scalebox{1 -1}{$y(n)=\sum_{i=1}^Mx_i(n)$}} }\endpspicture we must change it to: ........ \newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000} \psset{linecolor=dialinecolor} \rput[l](15.000000,-12.400000){\scalebox{1 -1}{$y^2_i(k)$}} \setfont{Helvetica}{0.800000} \newrgbcolor{dialinecolor}{0.000000 0.000000 0.000000} \psset{linecolor=dialinecolor} \rput[l](3.495000,-9.295000){\scalebox{1 -1}{$y(n)=\sum_{i=1}^Mx_i(n)$}} }\endpspicture
Doing that change would be rather simple, see plug-ins/pstricks/render_pstricks.c in function draw_string() But I would like to be able to test this change. Can you provide a working tex file with a short description ? I'm just getting as far as bug http://bugzilla.gnome.org/show_bug.cgi?id=166136 describes. Thanks, Hans
2006-01-14 Hans Breuer <hans@breuer.org> * plug-ins/pstricks/render_pstricks.c(draw_string) : now that I've found the nice samples from bug #156171 it was quite simple to confirm that the y value need indeed to be inverted. Fixes bug #304974. Also special case strings starting with \tex - i.e. dont escape them - to keep the use-case of direct tex input.