Scroll to navigation

polygons(3U) InterViews Reference Manual polygons(3U)

NAME

Rect, S_Rect, F_Rect, SF_Rect, Polygon, S_Polygon, F_Polygon,SF_Polygon - structured graphics classes for rectangles and polygons

SYNOPSIS

#include <Unidraw/Graphic/polygons.h>

DESCRIPTION

Rect and Polygon serve as abstract base classes for rectangle andpolygon structured graphics. They are derived from Graphic andVertices, respectively. Predefined subclasses include S_Rect, F_Rect,and SF_Rect, which draw stroked, filled, and stroked-filledrectangles, respectively; and S_Polygon, F_Polygon, and SF_Polygon,which draw stroked, filled, and stroked-filled polygons, respectively.The stroked subclasses store a PSBrush, the filled subclasses store aPSPattern, and the stroked-filled subclasses store one of each.

RECTPUBLICOPERATIONS

Return the rectangle's geometry, as specified in the constructor.(x0, y0) defines one corner of the rectangle, while (x1, y1) defines the opposing corner.

RECTPROTECTEDOPERATIONS

The constructor is protected to disallow instantiation of the abstractbase class. A rectangle's geometry is defined by two points,corresponding to opposing corners of the rectangle. The constructoralso takes an optional graphic from which to obtain an initial set ofgraphics state.
)
)
Helper functions that return extent and hit detection informationbased on the bounding box that the rectangle defines. s_getExtent,s_contains, and s_intersects return information that accounts for thewidth of a brush, as would be necessary if the rectangle is stroked,while f_getExtent, f_contains, and f_intersects assumes that therectangle is filled. Subclasses can use the operations to helpimplement their getExtent, contains, and intersects operations.

RECTSUBCLASSPUBLICOPERATIONS

Constructors for the various predefined Rect subclasses.

POLYGONPROTECTEDOPERATIONS

Polygon's constructor is protected to prevent instantiation of theabstract base class. The parameters are passed directly to theVertices constructor.

POLYGONSUBCLASSPUBLICOPERATIONS

Constructors for the various predefined Rect subclasses.

SEEALSO

Graphic(3U), Vertices(3U), geomobjs(3U), pspaint(3U)

2 February 1991 Unidraw