CALL GPOLY (x, y <*>, style <*>, ocolor <*>, pattern <*>, color <*>, window <*>, viewport );
The GPOLY subroutine is a graphical call that draws and fills a polygon. This call is part of the traditional graphics subsystem, which is no longer being developed.
The required arguments to the GPOLY subroutine are as follows:
is a vector that defines the horizontal coordinates of the corners of the polygon.
is a vector that defines the vertical coordinates of the corners of the polygon.
The optional inputs to the GPOLY subroutine are as follows:
is a numeric matrix or literal that specifies an index that corresponds to a valid line style.
is a matrix or literal that specifies a valid outline color. The ocolor argument can be specified as a quoted text string (such as 'RED'), the name of a character matrix that contains a valid color as an element, or a color number (such as 1) that refers to a color in the color list.
is a character matrix or quoted literal that specifies the pattern to fill the interior of a closed curve.
is a valid SAS color used in filling the polygon. The color argument can be specified as a quoted text string (such as 'RED'), the name of a character matrix that contains a valid color as an element, or a color number (such as 1) that refers to a color in the color list.
is a numeric matrix or literal that specifies a window. This is given in world coordinates and has the form
{minimum-x minimum-y maximum-x maximum-y} |
is a numeric matrix or literal that specifies a viewport. This is given in normalized coordinates and has the same form as the window argument.
The GPOLY subroutine fills an area enclosed by a polygon. The polygon is defined by the set of points given in the vectors x and y. The color argument is the color used in shading the polygon, and ocolor is the outline color. By default, the shading color and the outline color are the same, and the interior pattern is empty. The coordinates in use for this graphics command are world coordinates. An example that uses the GPOLY subroutine follows:
call gstart; xd = {20 20 80 80}; yd = {35 85 85 35}; call gpoly (xd, yd, , ,"X", 'red'); call gshow;