aboutsummaryrefslogtreecommitdiff
path: root/src/graph/PS/fillpoly.ps
blob: 5d387fa5dc49259a5f2c2c6f780db594d09f0f86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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