Status Update
Comments
vi...@google.com <vi...@google.com> #2
Thanks! Over to Nader to take a detailed look!
es...@google.com <es...@google.com>
ju...@google.com <ju...@google.com>
ac...@google.com <ac...@google.com> #3
I believe we should dup
di...@google.com <di...@google.com>
jb...@google.com <jb...@google.com> #4
Yes definitely. Thanks Siyamed!
In the meantime there maybe other ways to work around it. The main issue is that surface implicitly creates a seaprate layer which impacts the behavior of the blending modes. Being ale to just set the Brush on the paint directly would work around this in the most straightforward way.
du...@google.com <du...@google.com> #5
The issue is that the content depends on transparent pixels existing in the scene before the gradient is applied.
To address this you can do the following in order to force rasterization of the graphicsLayer into a separate buffer using CompositingStrategy.Offscreen
, then only draw the gradient on top of the pixels rendered by the text Composable.
Text("Hello World!", modifier =
// Use offscreen compositing strategy so that there are transparent pixels in the offscreen buffer
// to blend against with the SrcIn blend mode
Modifier.graphicsLayer(compositingStrategy = CompositingStrategy.Offscreen).drawWithCache {
val brush = Brush.horizontalGradient(listOf(Color.Red, Color.Blue, Color.Cyan, Color.Magenta, Color.Green))
onDrawWithContent {
drawContent()
drawRect(brush, blendMode = BlendMode.SrcIn)
}
}
)
Description
Other times the doesn't start at all after the 'Install' phase.
The idea.log file attached is from an attempt to start the app without debugging (i.e. Shift+10). Device is a Pixel 4.
Thanks.
Regards,
Flavio Antonioli.
Build: AI-191.8026.42.35.6010548, 201911150702, AI-191.8026.42.35.6010548, JRE 1.8.0_202-release-1483-b49-5587405x64 JetBrains s.r.o, OS Linux(amd64) v4.15.0-72-generic, screens 3840x2160, 1600x1200AS: 3.5.3; Android Gradle Plugin: 3.5.3; Gradle: 5.4.1; NDK: from local.properties: 20.0.5594570, latest from SDK: 20.0.5594570; LLDB: LLDB 3.1 (revision: 3.1.4508709); CMake: from local.properties: (not specified), latest from SDK: 3.10.2, from PATH: 3.10.2Source: user_sentiment_feedback IMPORTANT: Please read