Join Slack
Powered by
Do we have anything like MeshGradient in compose ?...
# compose
s
Shabinder Singh
07/13/2024, 6:02 PM
Do we have anything like MeshGradient in compose ? SwiftUI recently shipped this, also can check out
https://x.com/dankuntz/status/1800290461351035346
for an example.
Shabinder Singh
07/13/2024, 6:18 PM
https://gist.github.com/KlassenKonstantin/d5f6ed1d74b3ddbdca699d66c6b9a3b2
Found Something for Android, but uses matrix which is android only
s
Sergey Y.
07/13/2024, 6:56 PM
There's API Surprisingly, Android has had this API since day one, starting from API level one. However, it's not as convenient as what SwiftUI offers
https://developer.android.com/reference/android/graphics/Canvas#drawVertices(android.graphics.Canvas.VertexMode,%20int,%20float[],%20int,%20float[],%20int,%20int[],%20int,%20short[],%20int,%20int,%20android.graphics.Paint)
Sergey Y.
07/13/2024, 6:56 PM
As you can see, people have already tried to adapt it for Compose. You can do the same and achieve similar results.
https://x.com/sinasamaki/status/1805207996668227771?s=19
👀 1
Sergey Y.
07/13/2024, 8:33 PM
Oh, I keep forgetting this channel is for Compose Multiplatform, not just Android. 😅
8
Views
Open in Slack
Previous
Next