1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

LibGfx: Add FloatPoint methods

Adds some conversion constructors, as well as the missing arithmetic
operations.
This commit is contained in:
Matthew Olsson 2020-07-22 14:50:54 -07:00 committed by Andreas Kling
parent 5985eac81d
commit 9cce7f57dd
4 changed files with 54 additions and 14 deletions

View file

@ -42,7 +42,7 @@ void LineBox::add_fragment(const LayoutNode& layout_node, int start, int length,
m_fragments.last().m_length = (start - m_fragments.last().m_start) + length;
m_fragments.last().set_width(m_fragments.last().width() + width);
} else {
m_fragments.append(make<LineBoxFragment>(layout_node, start, length, Gfx::FloatPoint(m_width, 0), Gfx::FloatSize(width, height)));
m_fragments.append(make<LineBoxFragment>(layout_node, start, length, Gfx::FloatPoint(m_width, 0.0f), Gfx::FloatSize(width, height)));
}
m_width += width;