| ellipses(3U) | InterViews Reference Manual | ellipses(3U) |
NAME¶
Ellipse, S_Ellipse, F_Ellipse, SF_Ellipse, S_Circle, F_Circle,SF_Circle - abstract base class and predefined subclasses forelliptical structured graphics
SYNOPSIS¶
#include <Unidraw/Graphic/ellipses.h>
DESCRIPTION¶
Ellipse is an abstract base class for elliptical structured graphicsobjects. It stores geometric information that such graphics requireand provides helper functions for calculating extents and for hitdetection. Predefined subclasses include S_Ellipse, F_Ellipse, andSF_Ellipse, which draw stroked, filled, and stroked-filled ellipses,respectively; and S_Circle, F_Circle, and SF_Circle, which drawstroked, filled, and stroked-filled circles, respectively.The stroked subclasses store a PSBrush, the filled subclasses store aPSPattern, and the stroked-filled subclasses store one of each.
ELLIPSEPUBLICOPERATIONS¶
- void GetOriginal(Coord& x, Coord& y, int& rx, int& ry)
- Return the ellipse's geometry. (x, y) defines the ellipse's center, while rx and ry define its horizontal and vertical radii, respectively.
ELLIPSEPROTECTEDOPERATIONS¶
- Ellipse(Coord x, Coord y, int rx, int ry, Graphic* = nil)
- The constructor is protected to disallow instantiation of the abstractbase class. An ellipse's geometry is defined in terms of its centerand its horizontal and vertical radii. The constructor also takes anoptional graphic from which to obtain an initial set of graphicsstate.
- void s_getExtent(
- float&, float&, float&, float&, float&, Graphic*
- )
- void f_getExtent(
- float&, float&, float&, float&, float&, Graphic*
- )
- boolean s_contains(PointObj&, Graphic*)
- boolean f_contains(PointObj&, Graphic*)
- boolean s_intersects(BoxObj&, Graphic*)
- boolean f_intersects(BoxObj&, Graphic*)
- Helper functions that return extent and hit detection informationbased on the bounding box that the ellipse defines. s_getExtent,s_contains, and s_intersects return information that accounts for thewidth of a brush, as would be necessary if the ellipse is stroked,while f_getExtent, f_contains, and f_intersects assumes that theellipse is filled. Subclasses can use the operations to helpimplement their getExtent, contains, and intersects operations.
SUBCLASSPUBLICOPERATIONS¶
- S_Ellipse(Coord x, Coord y, int rx, int ry, Graphic* = nil)
- F_Ellipse(Coord x, Coord y, int rx, int ry, Graphic* = nil)
- SF_Ellipse(Coord x, Coord y, int rx, int ry, Graphic* = nil)
- S_Circle(Coord x, Coord y, int radius, Graphic* = nil)
- F_Circle(Coord x, Coord y, int radius, Graphic* = nil)
- SF_Circle(Coord x, Coord y, int radius, Graphic* = nil)
- Constructors for the various predefined Ellipse subclasses.
SEEALSO¶
Graphic(3U), geomobjs(3U), pspaint(3U)
| 2 February 1991 | Unidraw |