mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 23:56:06 +00:00
LibGfx: Templatize Point, Size, and Rect
This commit is contained in:
parent
7a1c328417
commit
335916d8db
Notes:
sideshowbarker
2024-07-19 04:34:50 +09:00
Author: https://github.com/mattco98
Commit: 335916d8db
Pull-request: https://github.com/SerenityOS/serenity/pull/2888
Reviewed-by: https://github.com/awesomekling
33 changed files with 404 additions and 835 deletions
|
@ -102,8 +102,8 @@ void LineTool::on_second_paint(const Layer& layer, GUI::PaintEvent& event)
|
|||
|
||||
GUI::Painter painter(*m_editor);
|
||||
painter.add_clip_rect(event.rect());
|
||||
auto preview_start = m_editor->layer_position_to_editor_position(layer, m_line_start_position).to_int_point();
|
||||
auto preview_end = m_editor->layer_position_to_editor_position(layer, m_line_end_position).to_int_point();
|
||||
auto preview_start = m_editor->layer_position_to_editor_position(layer, m_line_start_position).to_type<int>();
|
||||
auto preview_end = m_editor->layer_position_to_editor_position(layer, m_line_end_position).to_type<int>();
|
||||
painter.draw_line(preview_start, preview_end, m_editor->color_for(m_drawing_button), m_thickness);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue