Don't understand PS <-> gnomeprint
- From: John Coppens <john jcoppens com>
- To: gnome-print-list gnome org
- Subject: Don't understand PS <-> gnomeprint
- Date: Tue, 8 Jun 2004 14:28:02 -0300
Hi guys
I've been trying to add gnome-print to a Smith chart plot program I've
done, and though I have somehow made it print, I can't understand the
exact relationship between gnome-print and the generated PS (the code very
nearly reflects the PS example at the bottom of the message):
gnome_print_newpath(gpc);
gnome_print_moveto(gpc, x * chrad + r, (1 - y)* chrad);
gnome_print_arcto(gpc, x * chrad, (1 - y)* chrad, r, 0, 360, 0);
gnome_print_closepath(gpc);
gnome_print_gsave(gpc);
print_setrgbcolor(pref.prt_fill_color[pstyle]); (converts color,
calls gnome_print_setrgbcolor)
gnome_print_fill(gpc);
gnome_print_grestore(gpc);
print_setrgbcolor(pref.prt_brdr_color[pstyle]); (see above)
gnome_print_setlinewidth(gpc, pref.prt_brdr[pstyle]);
gnome_print_stroke(gpc);
generates: (eliminated large amounts of data)
q
1 0.376 0.376 rg
n newpath - ok
441.659 525.753 m moveto - ok
441.659 525.753 l construction of the arc - ok
441.659 525.803 l (though why not use 'arc'?)
441.657 525.852 l
441.655 525.902 l
... edited ...
441.652 525.556 l
441.655 525.605 l
441.657 525.654 l
441.659 525.704 l
441.659 525.753 l
h closepath - ok
f fill? where is the 'gsave'? the 'setrgbcolor'?
Q 'grestore'?
1 0.376 0.376 rg
0.566929 w 0 J 0 j 11 M no 'setlinecap' etc.
[]0 d no 'setdash' in the program...
n newpath again? for the same circle?
441.659 525.753 m
441.659 525.753 l
441.659 525.803 l
441.657 525.852 l
441.655 525.902 l
... edited ...
441.655 525.605 l
441.657 525.654 l
441.659 525.704 l
441.659 525.753 l
h closepath - ok
S stroke - ok
q gsave?
n next call to the above code
378.945 480.286 m
378.945 480.286 l
378.944 480.336 l
-------
Example PS code:
newpath
100 100 moveto
0 100 rlineto
100 0 rlineto
0 -100 rlineto
-100 0 rlineto
closepath
gsave
0.5 1 0.5 setrgbcolor
fill
grestore
1 0 0 setrgbcolor
4 setlinewidth
stroke
from
http://astronomy.swin.edu.au/~pbourke/geomformats/postscript/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]