Author Topic: Color gradient?  (Read 21298 times)

MulziSAW

  • Newbie
  • *
  • Posts: 3
    • View Profile
Color gradient?
« 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

Andreas

  • Administrator
  • Full Member
  • *****
  • Posts: 140
    • View Profile
Re: Color gradient?
« Reply #1 on: January 17, 2010, 10:13:03 PM »
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.
This forum belongs to www.schmidt-web-berlin.de/winfig

MulziSAW

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Color gradient?
« Reply #2 on: January 18, 2010, 08:15:44 AM »
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)

Andreas

  • Administrator
  • Full Member
  • *****
  • Posts: 140
    • View Profile
Re: Color gradient?
« Reply #3 on: January 19, 2010, 01:34:41 AM »
Probably there is only pstoedit to convert from various verctor formats to FIG and then WinFIG to convert to a bitmap format.
This forum belongs to www.schmidt-web-berlin.de/winfig

MulziSAW

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Color gradient?
« Reply #4 on: January 19, 2010, 08:38:33 AM »
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

Andreas

  • Administrator
  • Full Member
  • *****
  • Posts: 140
    • View Profile
Re: Color gradient?
« Reply #5 on: January 28, 2010, 11:26:28 PM »
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.
This forum belongs to www.schmidt-web-berlin.de/winfig

Littlejenny

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Color gradient?
« Reply #6 on: October 25, 2010, 03:44:08 AM »
Quote
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 ?
« Last Edit: October 26, 2010, 02:50:05 AM by Littlejenny »