Summary: | Snap to grid does not work at the edge of the canvas | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Chris W <chriswood> |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chriswood, rojasreinold |
Priority: | NOR | ||
Version: | 5.2.3 | ||
Target Milestone: | --- | ||
Platform: | Android | ||
OS: | Android 14.x | ||
Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/f639df17feea76ff67985e96e4b6c517b969fb1a | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | screen recording of trying to use the bezier tool with snap to grid at the edge of the canvas |
Description
Chris W
2024-08-31 03:04:14 UTC
Sorry, I didn't see the extra fields! OBSERVED RESULT Bezier tool loosely snaps to the edge of the canvas instead of to the grid points that lie on the edge of the canvas. This means that points on the edge of the canvas do not align with the grid. EXPECTED RESULT Tapping a grid point on the edge of the canvas places the next bezier vertex exactly at the grid point. SOFTWARE/OS VERSIONS Windows: n/a macOS: n/a (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: n/a KDE Plasma Version: n/a KDE Frameworks Version: n/a Qt Version: n/a ADDITIONAL INFORMATION Reproduced on a Samsung Galaxy S8 Tab Ultra (Android) Created attachment 173154 [details]
screen recording of trying to use the bezier tool with snap to grid at the edge of the canvas
I can confirm that the "snap to grid" doesn't work for the grid points at the edge of the canvas. It does snap edge of the canvas but does not snap to the intersecting points. Seems to be reproducible on any edge of the canvas Git commit 4009f8f911f6ec9006c4652eb029d3213df76a06 by Dmitry Kazakov. Committed on 15/11/2024 at 14:00. Pushed by dkazakov into branch 'krita/5.2'. Make sure that point-based snap points have higher priority than line-based ones Basically, if grid intersection lays near (or on the top of) the guide (or image bounds), then this intersection should have higher priority than snapping to a "mere" line. Ideally, we should make some clver resolver that can also find intersections between the different snap strategies, e.g. inteersection between a guide and a grid line. But it needs quite a lot of redesing in our snapping code, so we can postpone it now. M +1 -1 libs/basicflakes/tools/KoCreatePathTool_p.h M +9 -5 libs/flake/KoSnapGuide.cpp M +33 -16 libs/flake/KoSnapStrategy.cpp M +15 -2 libs/flake/KoSnapStrategy.h M +1 -1 libs/ui/canvas/KisSnapPixelStrategy.cpp M +1 -1 libs/ui/canvas/KisSnapPointStrategy.cpp M +4 -1 libs/ui/canvas/kis_snap_line_strategy.cpp https://invent.kde.org/graphics/krita/-/commit/4009f8f911f6ec9006c4652eb029d3213df76a06 Git commit f639df17feea76ff67985e96e4b6c517b969fb1a by Dmitry Kazakov. Committed on 15/11/2024 at 14:07. Pushed by dkazakov into branch 'master'. Make sure that point-based snap points have higher priority than line-based ones Basically, if grid intersection lays near (or on the top of) the guide (or image bounds), then this intersection should have higher priority than snapping to a "mere" line. Ideally, we should make some clver resolver that can also find intersections between the different snap strategies, e.g. inteersection between a guide and a grid line. But it needs quite a lot of redesing in our snapping code, so we can postpone it now. M +1 -1 libs/basicflakes/tools/KoCreatePathTool_p.h M +9 -5 libs/flake/KoSnapGuide.cpp M +33 -16 libs/flake/KoSnapStrategy.cpp M +15 -2 libs/flake/KoSnapStrategy.h M +1 -1 libs/ui/canvas/KisSnapPixelStrategy.cpp M +1 -1 libs/ui/canvas/KisSnapPointStrategy.cpp M +4 -1 libs/ui/canvas/kis_snap_line_strategy.cpp https://invent.kde.org/graphics/krita/-/commit/f639df17feea76ff67985e96e4b6c517b969fb1a |