Skip to content
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

🎭 Mask Bug Fix #245

Merged
merged 27 commits into from
Mar 14, 2022
Merged

🎭 Mask Bug Fix #245

merged 27 commits into from
Mar 14, 2022

Conversation

wcandillon
Copy link
Contributor

@wcandillon wcandillon commented Mar 12, 2022

This PR fixes #247 and also improve the blend mode example.

The current example was not documenting blend modes properly, we could use it as a reference as seen at
https://skia.org/docs/user/api/skblendmode_overview/

Fiddle: https://fiddle.skia.org/c/5c181cf8f5471e7f58aad4c59222799b

  • Update documentation
  • Improve rasterize property. Potential options are:
    • rename it to layer
    • make it accept a boolean
    • make it accept a paint element
    • remove usePaintRef()
  • Verify why we need we second razterize call: likely because of the translation.

@wcandillon wcandillon self-assigned this Mar 12, 2022
@wcandillon wcandillon marked this pull request as draft March 12, 2022 10:14
@wcandillon wcandillon marked this pull request as ready for review March 12, 2022 16:32
@wcandillon wcandillon requested a review from chrfalch March 12, 2022 16:32
@wcandillon wcandillon changed the title 🎨 Fix Blend Mode Example 🎭 Mask Bug Fix Mar 13, 2022
Copy link
Contributor

@chrfalch chrfalch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I added a comment about the syntax for useDerivedValue - but I think we'll change this so it doesn't matter :)

@@ -31,6 +34,8 @@ const clipRRect = Skia.RRectXY(
);

export const Clipping = () => {
const progress = useLoop({ duration: 3000 });
const x = useDerivedValue(() => mix(progress.current, 0, 200), [progress]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 const x = useDerivedValue((p) => mix(p, 0, 200), [progress]);

@chrfalch chrfalch merged commit efdac2c into main Mar 14, 2022
@chrfalch chrfalch deleted the wcandillon-patch-2 branch March 14, 2022 07:23
@wcandillon
Copy link
Contributor Author

Yes let's talk about the useDerivedValue thingy ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mask Bugs
2 participants