mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:17:35 +00:00
LibGfx: Unify Rect, Point, and Size
This commit unifies methods and method/param names between the above classes, as well as adds [[nodiscard]] and ALWAYS_INLINE where appropriate. It also renamed the various move_by methods to translate_by, as that more closely matches the transformation terminology.
This commit is contained in:
parent
ac238b3bd6
commit
88cfaf7bf0
48 changed files with 282 additions and 187 deletions
|
@ -79,7 +79,7 @@ Gfx::IntRect Label::text_rect(size_t line) const
|
|||
if (frame_thickness() > 0)
|
||||
indent = font().glyph_width('x') / 2;
|
||||
auto rect = frame_inner_rect();
|
||||
rect.move_by(indent, line * (font().glyph_height() + 1));
|
||||
rect.translate_by(indent, line * (font().glyph_height() + 1));
|
||||
rect.set_width(rect.width() - indent * 2);
|
||||
return rect;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue