[Cairo] py-cairo example & Context save/restore quesiton

Bill Spitzak spitzak at d2.com
Fri Nov 14 15:17:12 PST 2003


On Friday 14 November 2003 10:57 am, Jesse David Andrews wrote:
> I was under the impression that postscript did _NOT_ save the current
> path.  (I used this property as the basis for LPS:
> http://sweb.uky.edu/~jdandr2/lps which is a similar product to cls -
> cairo lindenmayer system except it takes text files and compiles them to
> postscript)
>
> Again, I'll dive into once I get home (postscript manuals are there ...)

A quick test with ghostview seems to indicate it works like you say. Here is 
my test file, if it prints a rectangle (and not a pointed shape) then it 
works as you say:

100 100 moveto
200 100 lineto
gsave
250 125 lineto
grestore
200 150 lineto
100 150 lineto
closepath
fill
showpage

-- 
                   ,~,~,~,~ ~ ~ ~ ~
     /\_       _|_========___         Bill Spitzak
 ~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com




More information about the cairo mailing list