-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(): Pattern
Gradient
transform
#8263
Open
ShaMan123
wants to merge
119
commits into
master
Choose a base branch
from
gradient-transform
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
This line was missed in #6296
This reverts commit ba43568.
This reverts commit 03d94c3.
`node-canvas` and chrome accept only `DOMMatrix` https://bugs.chromium.org/p/chromium/issues/detail?id=289572#c31
ShaMan123
commented
Sep 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made major progress but I am stuck in the transform matrix calculation.
Help is needed
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs 😔. Thank you for your contributions. |
7 tasks
This was referenced May 22, 2023
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.
First merge #8255, update from master
This PR refactors how fabric transforms patterns and gradients by using the native
Pattern#setTransform
and refactoring logic to allow a simpler solution for Gradient than what was before.We can consider enhancing perf by keeping a ref to the live pattern/gradient and invalidating it when one of the values change. This PR makes it possible to keep the ref even if the
patternTransform
changes.fixes #5506 (added 2 visual tests)
ts-pattern...gradient-transform
Changes
.browserslistrc
: bump chrome version, see MDNHEADER.js
: exposeDOMMatrix
fromnode-canvas
forPattern#setTransform
node-canvas
forPattern#SetTransform
src/Filler.ts
: create base classFiller
, a delegate that is in charge of preparing ctx for gradient/pattern fill/stroke_setStrokeStyles
_setFillStyles
_applyPatternForTransformedGradient
_applyPatternGradientTransform
tests
: addedsinon
for stubbing etc.Point
: removedtype
for usage as a spread object{ ...point }
(type
is a sensitive word in fabric)Follow Up
createConicGradient