Last active
May 6, 2023 14:55
-
-
Save benawad/01d7e6e3f108f52d88cba17a10526b63 to your computer and use it in GitHub Desktop.
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
// I'm trying to get paths with clip-rule to work. Example: | |
// <path fill-rule="evenodd" clip-rule="evenodd" d="M148 62.5C148" /> | |
// this works | |
const p = Skia.Path.MakeFromSVGString(`<path fill-rule="evenodd" clip-rule="evenodd" d="M148 62.5C148" />`) | |
const frame0 = { | |
props: { | |
"fillRule": "evenodd", | |
"clipRule": "evenodd", | |
"d": "M148 62.5C148" | |
} | |
} | |
// this currently does not work | |
const start = useMemo(() => { | |
const p = Skia.Path.MakeFromSVGString(frame0.props.d)!; | |
if (frame0.props.fillRule) { | |
p.setFillType(FillType.EvenOdd); | |
} | |
return p; | |
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment