Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1423
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | What is the best way to work with a dictionary |
| Organization | Decebal Computing |
| Date | 2013-07-13 22:13 +0200 |
| Message-ID | <87zjtqdxrl.fsf@Aspire.decebal.nl> (permalink) |
Until now I wrote functions like:
/ellipse { % x y unitX unitY colour
5 dict begin
/colour exch def
/unitY exch def
/unitX exch def
/y exch def
/x exch def
gsave
newpath
colour setrgbcolor
x y translate
unitX unitY scale
1 1 1 0 360 arc closepath fill
stroke
grestore
end
} def
I just saw in ‘PostScript Drawing: An Economist's Guide’ that it also
should be possible to do it in the following way:
/ellipse { % x y unitX unitY colour
<<
/colour exch def
/unitY exch def
/unitX exch def
/y exch def
/x exch def
>> begin
gsave
newpath
colour setrgbcolor
x y translate
unitX unitY scale
1 1 1 0 360 arc closepath fill
stroke
grestore
end
} def
Which of the two is the better one and why? I think I like the second
one more.
The only problem is that it does not work. I get:
Error: /unmatchedmark in -->>--
I am using:
GPL Ghostscript 9.06
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.postscript | Previous | Next — Next in thread | Find similar | Unroll thread
What is the best way to work with a dictionary Cecil Westerhof <Cecil@decebal.nl> - 2013-07-13 22:13 +0200
Re: What is the best way to work with a dictionary Helge Blischke <h.blischke@acm.org> - 2013-07-13 22:32 +0200
Re: What is the best way to work with a dictionary Cecil Westerhof <Cecil@decebal.nl> - 2013-07-13 23:25 +0200
Re: What is the best way to work with a dictionary luser- -droog <mijoryx@yahoo.com> - 2013-07-13 17:04 -0700
Re: What is the best way to work with a dictionary Cecil Westerhof <Cecil@decebal.nl> - 2013-07-14 15:11 +0200
Re: What is the best way to work with a dictionary luser- -droog <mijoryx@yahoo.com> - 2013-07-14 08:04 -0700
Re: What is the best way to work with a dictionary Cecil Westerhof <Cecil@decebal.nl> - 2013-07-14 20:04 +0200
Re: What is the best way to work with a dictionary Olle <olavi.sakari@gmail.com> - 2013-07-15 06:13 -0700
Re: What is the best way to work with a dictionary Olle <olavi.sakari@gmail.com> - 2013-07-15 06:27 -0700
csiph-web