1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

LibGfx: Templatize Point, Size, and Rect

This commit is contained in:
Matthew Olsson 2020-07-25 21:31:47 -07:00 committed by Andreas Kling
parent 7a1c328417
commit 335916d8db
33 changed files with 404 additions and 835 deletions

View file

@ -101,7 +101,9 @@ void RectangleTool::on_second_paint(const Layer& layer, GUI::PaintEvent& event)
GUI::Painter painter(*m_editor);
painter.add_clip_rect(event.rect());
auto rect = Gfx::IntRect::from_two_points(m_editor->layer_position_to_editor_position(layer, m_rectangle_start_position).to_int_point(), m_editor->layer_position_to_editor_position(layer, m_rectangle_end_position).to_int_point());
auto rect = Gfx::IntRect::from_two_points(
m_editor->layer_position_to_editor_position(layer, m_rectangle_start_position).to_type<int>(),
m_editor->layer_position_to_editor_position(layer, m_rectangle_end_position).to_type<int>());
draw_using(painter, rect);
}