Repository navigation
Add a trail option for fading lines - #31
Open
jorgenbruntveit wants to merge 2 commits into
Open
jorgenbruntveit wants to merge 2 commits into
jorgenbruntveit wants to merge 2 commits into
Conversation
"Trail behind the pen" erases each line from its start while you draw, at a steady speed, so long lines take longer to go than short ones. When it is selected, Settings shows when erasing starts and how fast it runs.
While the button is held, nothing is erased. When you let go, the eraser waits the set delay and then runs along the line from its start at the set speed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a fifth choice to Settings → Drawing → Lines fade: Trail behind the pen.
What it does
Instead of the whole line fading after a few seconds, an eraser follows the line from where it started. Nothing is erased while the button is held, so you can draw an underline and keep it there as long as you need. When you release, the eraser waits the start delay and then runs along the line at a steady speed, so a long line takes longer to go than a short one, however fast it was drawn.
When the option is selected, two more rows appear:
Both are cleared by Reset like the other settings. Existing choices behave as before.
How
strokeStarton the line'sCAShapeLayer, so the line is erased smoothly along its exact shape. Removing points from the start instead made the line jump and slightly change shape as it shrank.strokeStartanimation that begins after the delay. The layer is removed when it finishes.fadeSeconds = -1, so the other values keep their meaning.keepnow checks for0exactly instead of<= 0.Testing
Built locally and tested on macOS 27.3 with short and long lines, held for a while before release, at different start and speed settings. The pointer and drawing behave as before with the other fade choices.
This touches the same picker as #27, so whichever lands second will need a small merge there.