Open strewhella opened 1 month ago
At the very least, it seems odd that the types for Paragraph
imply that it has the same interface (where ParagraphProps extends GroupProps
). If it's somehow special, it shouldn't accept color
and other paint props.
Description
I note that in the docs it mentions
The Paragraph component doesn't follow the same painting rules as other components
, so potentially this isn't a bug.I'm trying to color some
Paragraphs
via components rather than the builder to avoid some expensive layout calculations because changing only the color doesn't require a full layout. I'm finding that the only way to set the color on aParagraph
is viapushStyle
on the builder:But this means I have to recreate the
SkParagraph
when I want to change the text color.Are any of these methods intended to be supported? Am I doing something wrong? Is there an alternative I could use instead? Thanks in advance!
Version
1.2.3
Steps to reproduce
Attempt to use any method available on the TypeScript types and components other than
Skia.ParagraphBuilder.Make().pushStyle
to apply color toParagraph
text and note it doesn't workSnack, code example, screenshot, or link to a repository
I've tried these other methods without success:
Color prop on
Paragraph
:Nested
Paint
:Group
layer:Layer prop: