summaryrefslogtreecommitdiffstats
path: root/src/graphics/core/color.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/core/color.h')
-rw-r--r--src/graphics/core/color.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/graphics/core/color.h b/src/graphics/core/color.h
index 7cbd175..5d059e5 100644
--- a/src/graphics/core/color.h
+++ b/src/graphics/core/color.h
@@ -76,6 +76,16 @@ struct Color
{
return ! this->operator==(other);
}
+
+ inline Color operator*(float scale) const
+ {
+ Color c = *this;
+ c.r *= scale;
+ c.g *= scale;
+ c.b *= scale;
+ c.a *= scale;
+ return c;
+ }
};
/**