1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:47:36 +00:00

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.
This commit is contained in:
Andreas Kling 2020-06-10 10:57:59 +02:00
parent 656b01eb0f
commit 116cf92156
212 changed files with 1144 additions and 1144 deletions

View file

@ -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 };