Feat(canvas): Add transparency lock for Gradients and Shapes. Extend Clip Strokes to Bbox to Rect/Oval shapes.#9250
Open
DustyShoe wants to merge 9 commits into
Open
Conversation
…ing-support-for-gradients
…ing-support-for-gradients
…nts-review' into feature/clip-shapes-to-bbox
Add bbox clipping for canvas shapes and update the corresponding docs.
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
This PR adds transparency lock support to the canvas Gradient and Shapes tools for raster layers, so they now match Brush behavior when a layer is transparency locked.
2026-05-23.09-37-53.mp4
When the active raster layer has Transparency Lock enabled, both Linear and Radial gradients are applied with
source-atop, which keeps the effect inside already-opaque pixels and leaves fully transparent regions untouched.Shapes now also respect Transparency Lock in Rect, Oval, Polygon, and Freehand modes. Normal shape drawing uses
source-atopon transparency-locked raster layers, while subtractive shape drawing still usesdestination-outso it can clear existing pixels as expected.Just for clarity: I merged the previously created Gradient transparency lock PR into this PR so the Gradient and Shapes transparency-lock changes can ship together.
The change also:
Merge Plan
Normal merge. This is a frontend-and-docs-only change with no backend or API schema changes. The canvas object state changes are backward-compatible and do not require a separate redux migration.
Checklist