Re: [graphviz-interest] graphviz-interest Digest, Vol 136, Issue 2
Anton Shterenlikht <[email protected]> Wed, 04 Nov 2015 02:34:30 -0800 (PST)
| Newsgroups | gmane.comp.video.graphviz |
|---|---|
| Message-ID | <[email protected]> |
>From [email protected] Wed Nov 4 08:19:39 2015 >I will do what I can to help anyone who is inspired enough to use PIC, so here >is a gawk script that may fix all(?) your FIG files. It looks for the first >polygon of the file ("2 3 ...") and comments it out (the polygone command will >be 2 or more lines). I don't know why the FIG output begins with a >bounding-box polygon, but if there is only one bounding-box, this should remove it. > I hope this helps. > >gawk 'BEGIN{fixed=0;fixing=0}fixing==1{if ($0~/^ /)$0="# " $0;else >{fixed=1;fixing=0}}fixed==0 && /^2 3 /{$0="# remove surround " >$0;fixing=1}{print}' lnklst2.fig > >steve roush > >p.s. FIG format is documented here http://xfig.org/userman/frm_miscellaneous.html Steve, thank you. The fig format is quite readable. My version of the script came out longer: BEGIN{done=0;started=0} { if ( started==1 && $0~/^ / ) { $0="#***GV BUG?*** " $0; done=1 } else {started=0} if ( done==0 && $0~/^2 3 / ) { $0="#***GV BUG?*** " $0; started=1 } print } I use BSD awk, perhaps gawk allows for some simplifications. Anyway, does it appear as a graphviz bug to you that it adds image-size polygon when fig filter is invoked? Also, I was expecting Mrecord smooth box corners to be translated to fig as arcs, but these appear to be translated as open splines (3 4). Is this intendend? Many thanks Anton _______________________________________________ [email protected] http://lists.research.att.com/mailman/listinfo/graphviz-interest