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
When using Modifier.drawWithContent and BlendMode.BlendMode.SrcIn I get a different result than in a real device or emulator.
For example, this is the Compose code to build a partially filled star icon:
In case it helps, to make BlendMode.SrcIn work in Compose .graphicsLayer(compositingStrategy = CompositingStrategy.Offscreen) is also needed. But the result is the same with Roborazzi.
Should we enable this flag for all the project? Or only for specific screens? I see it also solves issues with elevations, shadows, and gradients. I guess there are some side effects and that's why it's not enabled by default.
When using
Modifier.drawWithContent
andBlendMode.BlendMode.SrcIn
I get a different result than in a real device or emulator.For example, this is the Compose code to build a partially filled star icon:
Here are some results I got using the sample Android app in
ComposeTest
.If I use
createComposeRule
, that internally uses aComponentActivity
I get a square image.But, If I use
RoborazziTransparentActivity
it works.After further investigation, it seems related with the
colorBackground
. It only works with a transparent background:When used in Compose Previews it works as expected, so I'm not sure what's going on.
Is this a problem of Roborazzi or a limitation of using Layoutlib?
Thanks in advance.
The text was updated successfully, but these errors were encountered: