aboutsummaryrefslogtreecommitdiff
path: root/src/platform/graphics/web_canvas/Brush.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/graphics/web_canvas/Brush.cpp')
-rw-r--r--src/platform/graphics/web_canvas/Brush.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/platform/graphics/web_canvas/Brush.cpp b/src/platform/graphics/web_canvas/Brush.cpp
index e69de29b..1c192b75 100644
--- a/src/platform/graphics/web_canvas/Brush.cpp
+++ b/src/platform/graphics/web_canvas/Brush.cpp
@@ -0,0 +1,23 @@
+#include "cru/platform/graphics/web_canvas/WebCanvasBrush.h"
+#include "cru/platform/graphics/web_canvas/WebCanvasGraphicsFactory.h"
+#include "cru/platform/graphics/web_canvas/WebCanvasResource.h"
+
+namespace cru::platform::graphics::web_canvas {
+WebCanvasBrush::WebCanvasBrush(WebCanvasGraphicsFactory* factory)
+ : WebCanvasResource(factory) {}
+
+WebCanvasBrush::~WebCanvasBrush() {}
+
+WebCanvasSolidColorBrush::WebCanvasSolidColorBrush(
+ WebCanvasGraphicsFactory* factory, const Color& color)
+ : WebCanvasBrush(factory), color_(color) {}
+
+Color WebCanvasSolidColorBrush::GetColor() { return color_; }
+
+void WebCanvasSolidColorBrush::SetColor(const Color& color) { color_ = color; }
+
+String WebCanvasSolidColorBrush::GetCssColor() const {
+ return color_.ToString();
+}
+
+} // namespace cru::platform::graphics::web_canvas