Is it possible to have two compose panels on top o...
# compose-desktop
m
Is it possible to have two compose panels on top of each other and the one on the top has a transparent background? Or it's the same case as any other swing panel?
i
"transparent background" basically means that you need alpha blending outside of compose (by Swing or even OS). It might not be so portable as things that you're doing inside Compose canvas. As far as I remember it might be achieved by switching direct rendering to render into swing graphics and only then present it. It might be enabled by
compose.swing.render.on.graphics
. Expect some perf drop, but better integration with swing app
🤔 1
a
Isnt that Box? Or am I missing something here?
m
Maybe I can have the app running with Metal for example and a swing panel containing two ComposePanels on top of each other rendering into swing graphics. Is is possible to to do this?
Box is only for composables but I want to have swing panel with a transparent background on top of compose @Arjan van Wieringen
👍 1
i
Is is possible to to do this?
compose.swing.render.on.graphics
is a way to render compose into swing graphics
I want to have swing panel with a transparent background on top of compose
Please note that introp views is usually placed under compose canvas (+ draw transparent hole in compose). This is why issues like "transparent interop background doesn't work" won't likely to be resolved (it's mainly for iOS, Desktop is more complicated but anyway)
m
Ah I thought that it's the same thing as the Software rendering engine
i
no, it's rendering compose by metal/ogl/d3d into texture and present it by swing after
thank you color 1
perf drop is due to extra copy of that texture