diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-10 10:57:59 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-10 10:59:04 +0200 |
commit | 116cf92156090bb3f5c15d5be145f1283884d65d (patch) | |
tree | 4496ab3e8c90add1c40da2eceee71324369ec0c6 /Applications/PixelPaint/Layer.h | |
parent | 656b01eb0fb659fb2d3ee4e6e4413a82543414e3 (diff) | |
download | serenity-116cf92156090bb3f5c15d5be145f1283884d65d.zip |
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
Diffstat (limited to 'Applications/PixelPaint/Layer.h')
-rw-r--r-- | Applications/PixelPaint/Layer.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Applications/PixelPaint/Layer.h b/Applications/PixelPaint/Layer.h index 662c2feb18..1c0f43daaf 100644 --- a/Applications/PixelPaint/Layer.h +++ b/Applications/PixelPaint/Layer.h @@ -40,19 +40,19 @@ class Layer : public RefCounted<Layer> { AK_MAKE_NONMOVABLE(Layer); public: - static RefPtr<Layer> create_with_size(const Gfx::Size&, const String& name); + static RefPtr<Layer> create_with_size(const Gfx::IntSize&, const String& name); ~Layer() {} - const Gfx::Point& location() const { return m_location; } - void set_location(const Gfx::Point& location) { m_location = location; } + const Gfx::IntPoint& location() const { return m_location; } + void set_location(const Gfx::IntPoint& location) { m_location = location; } const Gfx::Bitmap& bitmap() const { return *m_bitmap; } Gfx::Bitmap& bitmap() { return *m_bitmap; } - Gfx::Size size() const { return bitmap().size(); } + Gfx::IntSize size() const { return bitmap().size(); } - Gfx::Rect relative_rect() const { return { location(), size() }; } - Gfx::Rect rect() const { return { {}, size() }; } + Gfx::IntRect relative_rect() const { return { location(), size() }; } + Gfx::IntRect rect() const { return { {}, size() }; } const String& name() const { return m_name; } void set_name(const String& name) { m_name = name; } @@ -63,10 +63,10 @@ public: bool is_selected() const { return m_selected; } private: - explicit Layer(const Gfx::Size&, const String& name); + explicit Layer(const Gfx::IntSize&, const String& name); String m_name; - Gfx::Point m_location; + Gfx::IntPoint m_location; RefPtr<Gfx::Bitmap> m_bitmap; bool m_selected { false }; |