Advertisement
uniblab

2 extremely useful PostScript operators

Jan 1st, 2020
3,221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. % dict key tryget -> (any true)|false
  2. /tryget { 2 copy known {
  3.   get true
  4. } {
  5.   pop pop false
  6. } ifelse } bind def
  7.  
  8. % dict key trygetnot -> (any false)|true
  9. /trygetnot { 2 copy known {
  10.   get false
  11. } {
  12.   pop pop true
  13. } ifelse } bind def
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement