Sets
name
to the emptystring
,use_name
tofalse
, andred_part
,green_part
, andblue_part
to c.red_part
, c.green_part
, and c.blue_part
, respectively.
const
operator: bool operator== (const Color& c)Equality operator. Returns
true
, if thered_parts
,green_parts
, andblue_parts
of*this
and c are equal, otherwisefalse
. Thenames
anduse_names
are not compared.
const
operator: bool operator!= (const Color& c)Inequality operator. Returns
false
, if thered_parts
,green_parts
, andblue_parts
of*this
and c are equal, otherwisetrue
. Thenames
anduse_names
are not compared.
Output operator. Writes the MetaPost code for the
Color
toout_stream
when aPicture
is output. This occurs when theColor
has been used as an argument to drawing or filling functions.If
use_name
istrue
,name
is written toout_stream
. Otherwise, “(red_part
,green_part
,blue_part
)” is written toout_stream
.