Creates a
Colorand initializes itsred_part,green_part, andblue_partto 0.use_nameandon_free_storeare set tofalse.
true]])Creates a
Colorand makes it a copy of c. If n is not the empty string and u istrue,use_nameis set totrue. Otherwise, its set tofalse.
true])Creates a
Colorwith name n. Itsred_part,green_part, andblue_partare set to r/255.0, g/255.0, and b/255.0, respectively.use_nameis set to u.
false])Corresponds to the constructor above, except that u is
falseby default.
Creates an unnamed
Colorusing therealvalues r, g, and b for itsred_part,green_part, andblue_part, respectively.
Corresponds to the constructor above.
Pseudo-constructors for dynamic allocation of
Colors. They create aColoron the free store and allocate memory for it usingnew(Color). They return a pointer to the newColor.If c is a non-zero pointer or a reference, the new
Colorwill be a copy of c. If the new object is not meant to be a copy of an existing one, ‘0’ must be passed tocreate_new<Color>()as its argument. See Dynamic Allocation of Shapes, for more information.This function is used in the drawing and filling functions for
PathandSolid.Point::drawdot()should be changed to use it too, but I haven't gotten around to doing this yet.