aboutsummaryrefslogtreecommitdiff
path: root/src/graph/PS/draw.ps
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph/PS/draw.ps')
-rw-r--r--src/graph/PS/draw.ps22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/graph/PS/draw.ps b/src/graph/PS/draw.ps
new file mode 100644
index 00000000..1d3b5080
--- /dev/null
+++ b/src/graph/PS/draw.ps
@@ -0,0 +1,22 @@
+% operand stack configuration in order to use psDraw:
+% psDraw
+% vlist[0].y
+% vlist[0].x
+% n
+% ...
+% vlist[n].y
+% vlist[n].x
+% graphics-context dictionary
+% to draw lines connecting points in vlist[0] to vlist[n]
+
+/psDraw
+ { gsave
+ newpath
+ yVal moveto %% set currentpoint
+ 1 sub { %% loop to draw lines.
+ yVal lineto
+ } repeat
+ begin installGC stroke end %% draw in foreground color
+ grestore }
+ def
+