Creates a
Color
and initializes itsred_part
,green_part
, andblue_part
to 0.use_name
andon_free_store
are set tofalse
.
true
]])Creates a
Color
and makes it a copy of c. If n is not the empty string and u istrue
,use_name
is set totrue
. Otherwise, its set tofalse
.
true
])Creates a
Color
with name n. Itsred_part
,green_part
, andblue_part
are set to r/255.0, g/255.0, and b/255.0, respectively.use_name
is set to u.
false
])Corresponds to the constructor above, except that u is
false
by default.
Creates an unnamed
Color
using thereal
values 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 aColor
on 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
Color
will 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
Path
andSolid
.Point::drawdot()
should be changed to use it too, but I haven't gotten around to doing this yet.