Creates a
Pointand initializes its x, y, and z-coordinates to 0.
CURR_Y, [const real z = CURR_Z]])Creates a
Pointand initializes its x, y, and z-coordinates to the values of the arguments x, y, and z. The arguments y and z are optional. If they are not specified, the values ofCURR_YandCURR_Zare used. They are 0 by default, but can be changed by the user. This can be convenient, if all of thePointsbeing drawn in a particular section of a program have the same z or y and z values.
CURR_Y, [const real z = CURR_Z]])Corresponds to the constructor above, but is used for resetting the coordinates of an existing
Point.
Creates a
Pointand copies the values for its x, y, and z-coordinates from p.
Corresponds to the copy constructor above, but is used for resetting the coordinates of an existing
Point. This function exists purely as a convenience; the operatoroperator=()(see Point Reference; Operators) performs exactly the same function.
Pseudo-constructors for dynamic allocation of
Points. They create aPointon the free store and allocate memory for it usingnew(Point). They return a pointer to the newPoint.If p is a non-zero pointer or a reference, the new
Pointwill be a copy of p. If the new object is not meant to be a copy of an existing one, ‘0’ must be passed tocreate_new<Point>()as its argument. See Dynamic Allocation of Shapes, for more information.One use for
create_new<Point>is in the constructors forclassesof objects that can contain a variable number ofPoints, such asPathandPolygon. Another use is in the drawing and filling functions, where objects are copied and the copies put onto aPicture.Programmers who dynamically allocate
Pointsmust ensure that they are deallocated properly usingdelete!