feat(image-editor): wire Dodge tool — paint a stroke that brightens pixels#42
Merged
feat(image-editor): wire Dodge tool — paint a stroke that brightens pixels#42
Conversation
…ixels
Promotes the Dodge (O) tool from stub to functional. Drag on the canvas
to paint a stroke that brightens the pixels underneath, same idea as
PS's Dodge: each layer represents one stroke, layer opacity controls
intensity, and repeated strokes build up.
## Implementation
- \`BrushShape\` gains an optional \`mode: 'dodge' | 'burn'\` field. When
set, \`drawBrush\` overrides the stroke color (white for dodge, black
for burn) and the composite operation ('lighter' / 'multiply'). The
per-layer save/restore around \`drawShape\` already isolates these
changes from siblings, so no extra cleanup is needed.
- \`Canvas.tsx\` adds a tool-'dodge' branch that creates a brush layer
with \`mode: 'dodge'\`, default opacity 30 so a single stroke gives a
soft brighten — repeat to build up.
- \`OptionsBar\` shares the brush variant (stroke width slider) and adds
a dodge-specific hint.
- \`LayersPanel\` labels dodge/burn brushes distinctly so the layer list
reads cleanly.
- The 'burn' mode is wired in the data model + drawing path + label
table but no UI tool selects it yet — folded in so a future Burn-tool
PR is a one-line palette change.
Removes \`dodge\` from \`STUB_TOOLS\`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 tasks
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.
Summary
Promotes the Dodge (O) tool from stub to functional. Drag on the canvas
to paint a stroke that brightens the underlying pixels. Same idea as
PS's Dodge: each layer represents one stroke, layer opacity controls
intensity, and repeated strokes build up.
Implementation
set, `drawBrush` overrides the stroke color (white for dodge, black
for burn) and the composite operation (`'lighter'` / `'multiply'`).
Per-layer save/restore around `drawShape` already isolates these
changes from siblings.
layer with `mode: 'dodge'` and default opacity 30 so a single stroke
gives a soft brighten — repeat to build up.
a dodge-specific hint.
table but no UI tool selects it yet — folded in so a future Burn-tool
PR is a one-line palette change.
Removes `dodge` from `STUB_TOOLS`.
Test plan
🤖 Generated with Claude Code