Define an equal operator (i.e. '==') for maxscript visible
values.
Define a NOT equal operator (i.e. '!=') for maxscript visible
values.
: public Value
{
public:
AColor color;
#pragma push_macro("new")
#undef new
ENABLE_STACK_ALLOCATE(ColorValue);
#pragma pop_macro("new")
ScripterExport ColorValue (AColor col);
ScripterExport ColorValue (Color col);
ScripterExport ColorValue (COLORREF col);
ScripterExport ColorValue (BMM_Color_64& col);
ScripterExport ColorValue (Point3 col);
ScripterExport ColorValue (Point3Value* col);
ScripterExport ColorValue (float r, float g, float b, float a = 1.0f);
ScripterExport ~ColorValue ();
static ScripterExport Value* intern(AColor col);
static ScripterExport Value* intern(float r, float g, float b, float a = 1.0f);
static ScripterExport Value* intern(BMM_Color_64& col);
classof_methods (ColorValue, Value);
void collect();
ScripterExport void sprin1(CharStream* s);
# define is_color(v) ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(ColorValue))
#include "../macros/define_implementations.h"
# include "..\protocols\color.inl"
def_generic ( coerce, "coerce");
def_generic ( copy, "copy");
def_property ( red );
def_local_prop_alias ( r, red );
def_property ( green );
def_local_prop_alias ( g, green );
def_property ( blue );
def_local_prop_alias ( b, blue );
def_property ( alpha );
def_local_prop_alias ( a, alpha );
def_property ( hue );
def_local_prop_alias ( h, hue );
def_property ( saturation );
def_local_prop_alias ( s, saturation );
def_property ( value );
def_local_prop_alias ( v, value );
AColor to_acolor() { return color; }
Color to_color() { return Color (color.r, color.g, color.b); }
COLORREF to_colorref() { return RGB((int)(color.r * 255.0f), (int)(color.g * 255.0f), (int)(color.b * 255.0f)); }
Point3 to_point3() { return Point3 (color.r * 255.0, color.g * 255.0, color.b * 255.0); }
Point4 to_point4() { return Point4 (color.r, color.g, color.b, color.a); }
void to_fpvalue(FPValue& v);
IOResult Save(ISave* isave);
static Value* Load(ILoad* iload, USHORT chunkID, ValueLoader* vload);
};