Skip to content

Instantly share code, notes, and snippets.

@electronicbites
Created December 4, 2013 11:00
Show Gist options
  • Save electronicbites/7785802 to your computer and use it in GitHub Desktop.
Save electronicbites/7785802 to your computer and use it in GitHub Desktop.
% ------- Define procedures----
/inch {72 mul} def
/box % stack: x y => ---
{ newpath moveto
1 inch 0 rlineto 0 1 inch
rlineto −1 inch 0
rlineto closepath } def
/fillbox % stack: grayvalue => ---
{ setgray fill } def
% ----------- Main Program ----------- 3.5 inch 4.5 inch box
0 fillbox
3.75 inch 5 inch box
.4 fillbox
4 inch 5.5 inch box .8 fillbox showpage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment