diff options
author | crupest <crupest@outlook.com> | 2023-10-08 00:08:47 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-10-08 00:08:47 +0800 |
commit | b8777965040e0f5e80b4395a912ddca7999fd80c (patch) | |
tree | c2290290912a8e851b8a6c9f51ea7f094d809d84 /src/platform/graphics/web_canvas/Brush.cpp | |
parent | 6c6dc053488ded83581943844c2b4c2a606218f3 (diff) | |
download | cru-b8777965040e0f5e80b4395a912ddca7999fd80c.tar.gz cru-b8777965040e0f5e80b4395a912ddca7999fd80c.tar.bz2 cru-b8777965040e0f5e80b4395a912ddca7999fd80c.zip |
...
Diffstat (limited to 'src/platform/graphics/web_canvas/Brush.cpp')
-rw-r--r-- | src/platform/graphics/web_canvas/Brush.cpp | 23 |
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 |