Repository navigation
Part of gap 5: Scatter, Art and Pattern Brush Options - #948
Merged
Merged
Conversation
Double-clicking a Scatter, Art or Pattern brush in the Brushes panel (or the panel menu's Brush Options...) now opens its options dialog, as Calligraphic and Bristle brushes already did. OK runs brush.options and every stroke painted with the brush redraws. - Scatter Brush Options: Name; Size (10-1000 %), Spacing (10-10000 %), Scatter (-1000-1000 %) and Rotation (-180-180 deg), each Fixed (the first value), Random (between the two values) or Pressure (the first value at the lightest pen pressure, the second at the heaviest); Rotation relative to Page or Path. Scatter brushes now keep these modes (`modes`); brushes saved before keep their look (Random where the two values differ). - Art Brush Options: Name; Width (1-1000 %); Scale Proportionately, Stretch to Fit Stroke Length or Stretch Between Guides with the guides' Start and End (% of the art length); the four Directions; Flip Along and Across. - Pattern Brush Options: Name; Scale (1-10000 %), Spacing (0-10000 %); the five tiles (Outer Corner, Side, Inner Corner, Start, End) drawn with their art or None; Flip Along and Across; Stretch to fit, Add space to fit or Approximate path. - All three: Colorization (None, Tints, Tints and Shades, Hue Shift with its Key Color picked from the art's colours, the most used one by default) and a live preview of a stroke painted with the edited brush. Brush definitions from files and commands are now kept within these ranges (Brush::sanitize, also for Calligraphic and Bristle values); unknown modes, directions, fits or colorization methods are refused. The brush.options and ui.brushOptions docs list the new params and fields. Tests: the brush model (modes, pressure, sanitizing, art colours), engine params reaching the brush and strokes redrawing, junk params in command_sweep, and headless dialog tests for each dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of ROADMAP gap 5 (brushes).
Double-clicking a Scatter, Art or Pattern brush in the Brushes panel (or the panel menu's Brush Options…) opens its options dialog, as Calligraphic and Bristle brushes already did. OK runs
brush.options, and every stroke painted with the brush redraws.Scatter Brush Options: Name; Size, Spacing, Scatter and Rotation, each with two values and a mode:
Also Rotation relative to Page or Path. The stroke pipeline now gives scatter brushes the recorded pressure. Brushes saved before keep their look: Random where their two values differ, Fixed otherwise.
Art Brush Options: Width; Brush Scale Options (Scale Proportionately, Stretch to Fit Stroke Length, Stretch Between Guides with Start and End); the four Directions; Flip Along and Flip Across.
Pattern Brush Options: Scale and Spacing; the five tiles (Outer Corner, Side, Inner Corner, Start, End) shown with their art or "None"; Flip Along and Across; Fit (Stretch to fit, Add space to fit, Approximate path).
All three: Colorization (None, Tints, Tints and Shades, Hue Shift, with a Key Color picked from the art's colours) and a live stroke preview.
Untrusted input: brush definitions from files and commands are kept within their ranges by
Brush::sanitize, which also covers Calligraphic and Bristle values. Unknown choices are refused and change nothing.brush.optionsandui.brushOptionsdocument the new params. Interface strings are translated in every complete catalogue, and the ROADMAP is updated.Most ranges aren't confirmed against public docs. Scatter Rotation −180..180° is; the others are set generously (Scatter Size and Spacing 1–10000 %, Scatter ±1000 %, Art Width 1–1000 %, Pattern Scale 1–10000 %, Spacing 0–10000 %) so that no value an existing brush uses is clamped. Left for later: stylus tilt, bearing and rotation; Art brush Overlap; pressure on Art Width and Pattern Scale; generated corner tiles; picking new tile art; the Key Color eyedropper.
Tested:
cargo xtask ci(all 7 steps).scatter_art_and_pattern_brush_options_update_strokes.brush.optionscases in the command sweep.brush.getreturns afterwards.🤖 Generated with Claude Code