diff options
Diffstat (limited to 'include/cru/ui/render/GeometryRenderObject.h')
| -rw-r--r-- | include/cru/ui/render/GeometryRenderObject.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/include/cru/ui/render/GeometryRenderObject.h b/include/cru/ui/render/GeometryRenderObject.h index 5d2ba1e0..1c998ef0 100644 --- a/include/cru/ui/render/GeometryRenderObject.h +++ b/include/cru/ui/render/GeometryRenderObject.h @@ -1,39 +1,37 @@ #pragma once +#include "MeasureRequirement.h" #include "RenderObject.h" -#include "cru/platform/graphics/Brush.h" -#include "cru/platform/graphics/Geometry.h" -#include "cru/ui/render/MeasureRequirement.h" + +#include <cru/platform/graphics/Brush.h> +#include <cru/platform/graphics/Geometry.h> #include <optional> namespace cru::ui::render { class GeometryRenderObject : public RenderObject { public: - GeometryRenderObject(); + static constexpr auto kRenderObjectName = "GeometryRenderObject"; - CRU_DELETE_COPY(GeometryRenderObject) - CRU_DELETE_MOVE(GeometryRenderObject) - - ~GeometryRenderObject() override; + GeometryRenderObject(); public: void Draw(platform::graphics::IPainter* painter) override; RenderObject* HitTest(const Point& point) override; - std::shared_ptr<platform::graphics::IGeometry> GetGeometry() const; + std::shared_ptr<platform::graphics::IGeometry> GetGeometry(); void SetGeometry(std::shared_ptr<platform::graphics::IGeometry> geometry, std::optional<Rect> view_port = std::nullopt); - Rect GetViewPort() const; + Rect GetViewPort(); void SetViewPort(const Rect& view_port); - std::shared_ptr<platform::graphics::IBrush> GetFillBrush() const; + std::shared_ptr<platform::graphics::IBrush> GetFillBrush(); void SetFillBrush(std::shared_ptr<platform::graphics::IBrush> brush); - std::shared_ptr<platform::graphics::IBrush> GetStrokeBrush() const; + std::shared_ptr<platform::graphics::IBrush> GetStrokeBrush(); void SetStrokeBrush(std::shared_ptr<platform::graphics::IBrush> brush); - float GetStrokeWidth() const; + float GetStrokeWidth(); void SetStrokeWidth(float width); protected: |
