projects
/
mussa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
incorporate drawable and annotations
[mussa.git]
/
alg
/
color.cpp
diff --git
a/alg/color.cpp
b/alg/color.cpp
index 64eb7821e941f2ae0ad203b6fb2f621559e2b40f..ffc974cb3e6068c08e3d285fb1c2623c80347885 100644
(file)
--- a/
alg/color.cpp
+++ b/
alg/color.cpp
@@
-19,6
+19,14
@@
Color::Color(float red, float green, float blue, float alpha)
set(red, green, blue, alpha);
}
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;
void Color::set(float r, float g, float b, float a)
{
colors[RedChannel] = r;