WinFIG forum
WinFIG => General Discussion => Topic started by: MulziSAW on January 17, 2010, 07:47:17 PM
-
i got a problem with the grafic conversion i'm currently working on. i think there can nothing be done, but maybe someone got a good idea? ;)
what i do is:
draw something in inkscape -> save as eps
start a batch: converts every *.eps with pstoeit to *.fig -> converts every *.fig with fig2dev to *.pdf / *.tex
import *.tex in LaTeX
first problem: how do i tell fig2dev that every text is "special"?
second problem: .fig doesn't support color gradient and pstoedit doesn't export bitmaps, so i can't convert the color gradient in inkscape to bitmap
;D ;D ;D any help is appreciated ;D ;D ;D
Mulzi
-
The "special" flag could be set with some script. Text objects start with a "4"
This is a normal text object:
4 0 0 50 0 0 12 0.0000 4 167 425 1225 1588 $a_b$\001
And this is the same with the "special" flag:
4 0 0 50 0 0 12 0.0000 6 167 425 1225 1588 $a_b$\001
The flags encoded into the 9th value with logical OR.
Bit Description
0 Rigid text (text doesn't scale when scaling compound objects)
1 Special text (for LaTeX)
2 PostScript font (otherwise LaTeX font is used)
3 Hidden text
So, Special plus Postscript is Bit 1 and 2, which makes 2+4=6
Color gradients are not supported by the FIG file format. I would like to support them, but I would have to create a new version of the file format. Kind of difficult, because Xfig compatibility is still a requirement I want to keep.
-
thanks Andreas, i think the explanation will help me to write an script to make every text "special".
regarding the color gradient, is there any other tool which can convert from svn, eps or pdf to fig and has the possibility of bitmap output?
(then i could replace the color gradients with bitmaps)
-
Probably there is only pstoedit to convert from various verctor formats to FIG and then WinFIG to convert to a bitmap format.
-
but... it wouldn't break compatibility with xfig to add a "import from ps/pdf/eps"? ;D *justkidding*
thanks for your help and i think i'll get it to work somehow!
Mulzi
-
but... it wouldn't break compatibility with xfig to add a "import from ps/pdf/eps"? ;D *justkidding*
This is what pstoedit can do, but it can only properly convert pictures that don't contain things that are not possible win WinFIG/XFig.
-
And this is the same with the "special" flag:
4 0 0 50 0 0 12 0.0000 6 167 425 1225 1588 $a_b$\001
should it exactly 6 in here ?