You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code Block 1: Demonstrates the use of Image to display VectorPainter, and its effect is normal
Code Block 2: Demonstrates calling Painter's draw method in drawWithContent to draw VectorPainter, and its effect is also normal.
Code Block 3: Demonstrates the use of custom IconPainter including VectorPainter. At this time, it is impossible to obtain the exact size of VectorPainter and draw content.
Describe the bug
On the Web platform, VectorPainter cannot obtain the accurate size and draw content when running inside other Painters.
Affected platforms
Versions
To Reproduce
ic_image_outline.xml from Android Vector Asset
The sample code is as follows:
The screenshot of the log of running the effect on the web platform is as follows (the green color block cannot display the icon correctly):
The running effect on desktop platform and Android is as follows (the green color block can display the icon correctly):
desktop:
android:
The strange thing is that when creating IconPainter in Code Block 3 without using remember, the icon can be displayed correctly, as follows:
At this time, the running effect and log screenshots on the web platform are as follows:
Example Project
KMPProject.zip
The text was updated successfully, but these errors were encountered: