diff options
Diffstat (limited to 'src/graph/PS/fillpoly.ps')
-rw-r--r-- | src/graph/PS/fillpoly.ps | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/graph/PS/fillpoly.ps b/src/graph/PS/fillpoly.ps new file mode 100644 index 00000000..5d387fa5 --- /dev/null +++ b/src/graph/PS/fillpoly.ps @@ -0,0 +1,24 @@ +% operand stack configuration in order to use psDrawFilled: +% psFillPoly +% XPoint[0].y +% XPoint[0].x +% n +% ... +% XPoint[n].y +% XPoint[n].x +% graphics-context dictionary +% this draws a polygon by connecting all the points and fills the +% region with foreground color + +/psFillPoly + { gsave + newpath + yVal moveto + 1 sub { + yVal lineto + } repeat + closepath + begin installGC fill end %% fills with foreground color + grestore } + def + |