From e8f38c351d90d6dea371a9ac15d2c4906bff9910 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 27 Sep 2009 01:53:09 +0000 Subject: Fix SF/2854105 * graph/PS/*.ps: New. --- src/graph/PS/fillpoly.ps | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/graph/PS/fillpoly.ps (limited to 'src/graph/PS/fillpoly.ps') 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 + -- cgit v1.2.3