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

PixelPaint: Fix tool preview positions after moving a layer

Previously the tool previews did not account for the position of
the layer, so would be drawn in the wrong location if the layer was
not at 0,0.
This commit is contained in:
MacDue 2022-08-20 18:09:20 +01:00 committed by Andreas Kling
parent 973771f8f4
commit 78813313f9
5 changed files with 11 additions and 0 deletions

View file

@ -79,6 +79,8 @@ protected:
WeakPtr<ImageEditor> m_editor;
RefPtr<GUI::Action> m_action;
Gfx::IntPoint editor_layer_location(Layer const& layer) const;
virtual Gfx::IntPoint editor_stroke_position(Gfx::IntPoint const& pixel_coords, int stroke_thickness) const;
void set_primary_slider(GUI::ValueSlider* primary) { m_primary_slider = primary; }