1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:27:46 +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

@ -68,7 +68,7 @@ void GlyphEditorWidget::paint_event(GUI::PaintEvent& event)
for (int y = 0; y < font().glyph_height(); ++y) {
for (int x = 0; x < font().max_glyph_width(); ++x) {
Gfx::Rect rect { x * m_scale, y * m_scale, m_scale, m_scale };
Gfx::IntRect rect { x * m_scale, y * m_scale, m_scale, m_scale };
if (x >= font().glyph_width(m_glyph)) {
painter.fill_rect(rect, palette().threed_shadow1());
} else {

View file

@ -60,11 +60,11 @@ void GlyphMapWidget::set_selected_glyph(int glyph)
update();
}
Gfx::Rect GlyphMapWidget::get_outer_rect(int glyph) const
Gfx::IntRect GlyphMapWidget::get_outer_rect(int glyph) const
{
int row = glyph / columns();
int column = glyph % columns();
return Gfx::Rect {
return Gfx::IntRect {
column * (font().max_glyph_width() + m_horizontal_spacing) + 1,
row * (font().glyph_height() + m_vertical_spacing) + 1,
font().max_glyph_width() + m_horizontal_spacing,
@ -89,8 +89,8 @@ void GlyphMapWidget::paint_event(GUI::PaintEvent& event)
painter.fill_rect(frame_inner_rect(), palette().base());
for (int glyph = 0; glyph < m_glyph_count; ++glyph) {
Gfx::Rect outer_rect = get_outer_rect(glyph);
Gfx::Rect inner_rect(
Gfx::IntRect outer_rect = get_outer_rect(glyph);
Gfx::IntRect inner_rect(
outer_rect.x() + m_horizontal_spacing / 2,
outer_rect.y() + m_vertical_spacing / 2,
font().max_glyph_width(),

View file

@ -58,7 +58,7 @@ private:
virtual void mousedown_event(GUI::MouseEvent&) override;
virtual void keydown_event(GUI::KeyEvent&) override;
Gfx::Rect get_outer_rect(int glyph) const;
Gfx::IntRect get_outer_rect(int glyph) const;
RefPtr<Gfx::Font> m_font;
int m_glyph_count;