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

PixelPaint: Inherit from AbstractZoomPanWidget

This commit is contained in:
Mustafa Quraish 2022-01-08 04:44:19 -05:00 committed by Andreas Kling
parent b21d128075
commit 7974fee800
12 changed files with 69 additions and 244 deletions

View file

@ -107,8 +107,8 @@ void EllipseTool::on_second_paint(Layer const* 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_ellipse_start_position).to_type<int>();
auto preview_end = m_editor->layer_position_to_editor_position(*layer, m_ellipse_end_position).to_type<int>();
auto preview_start = m_editor->content_to_frame_position(m_ellipse_start_position).to_type<int>();
auto preview_end = m_editor->content_to_frame_position(m_ellipse_end_position).to_type<int>();
draw_using(painter, preview_start, preview_end, AK::max(m_thickness * m_editor->scale(), 1));
}