set(red, green, blue, alpha);
}
+Color::Color(const ColorRef c)
+{
+ set(c->colors[RedChannel],
+ c->colors[GreenChannel],
+ c->colors[BlueChannel],
+ c->colors[AlphaChannel]);
+}
+
void Color::set(float r, float g, float b, float a)
{
colors[RedChannel] = r;
std::ostream &operator<<(std::ostream &out, const Color &c)
{
- out << "Color(" << c.r() << ", "
- << c.g() << ", "
- << c.b() << ", "
- << c.a() << ")";
+ out << c.r() << " " << c.g() << " " << c.b() << " " << c.a();
+ return out;
}