These are chat archives for AvaloniaUI/Avalonia

21st
Jun 2018
Nelson Carrillo
@nc4rrillo
Jun 21 2018 01:22
So I'm fairly sure that opacity masks on Skia are broken..but it seems to predate the Skia cleanup ..
well something strange is going on..the unit tests pass but the canvas in the control catalog looks broken
Jeremy Koritzinsky
@jkoritzinsky
Jun 21 2018 01:30
Can you post a screenshot?
Nelson Carrillo
@nc4rrillo
Jun 21 2018 01:32
I'd expect the blue rect to have an opacity mask applied and fade to transparent
Jeremy Koritzinsky
@jkoritzinsky
Jun 21 2018 01:36
Weird... Not sure when it broke.
Nelson Carrillo
@nc4rrillo
Jun 21 2018 01:37
if I change the units to absolute then it works, I think something about how the bounds are calculated for the relative point
I get the bounds in pixels of the canvas itself rather than the contained shape
Jeremy Koritzinsky
@jkoritzinsky
Jun 21 2018 01:38
That makes sense.
Nelson Carrillo
@nc4rrillo
Jun 21 2018 01:38
I think something in geometry.Bounds is wrong
on the skia side
Nelson Carrillo
@nc4rrillo
Jun 21 2018 01:50
Figured it out
its a DeferredRenderer bug cc: @grokys
running with ImmediateRenderer applies the opacity mask with the right size
I'm curious how this looks with D2D
Nelson Carrillo
@nc4rrillo
Jun 21 2018 02:48
setting ClipToBounds to true for the Rectangle makes it work in Deferred
Jeremy Koritzinsky
@jkoritzinsky
Jun 21 2018 03:24
Hmm that's interesting. While you're investigating, can you file an issue just so we can keep track of it?
Vsevolod Pilipenko
@Karnah
Jun 21 2018 09:12
2018-06-21_14-07-53.png
Hello all. I've piddled with brushes. I know, transparency doesn't supporting for windows, but if you set Window.Background to Transparent (or use ImageBrush with transparent area) - transparent area will not be cleaned (only resize window clean it).
No. It's another bug :)
Jumar Macato
@jmacato
Jun 21 2018 09:14
Okay :+1:
Vsevolod Pilipenko
@Karnah
Jun 21 2018 09:15
Should I create a issue?
Jumar Macato
@jmacato
Jun 21 2018 09:15
@nc4rrillo this is the same issue that has bugged my Acrylic Window experiment, it's the exact ghosting artifact
@Karnah sure!
Vsevolod Pilipenko
@Karnah
Jun 21 2018 09:17
@jmacato, good, thanks!
Benedikt Stebner
@Gillibald
Jun 21 2018 12:53
Is someone still working on support for transparent windows or should I work on that feature?
Rayyan Tahir
@RayyanTahir
Jun 21 2018 13:07
@Gillibald Please go ahead with it :)
Jumar Macato
@jmacato
Jun 21 2018 13:19
@Gillibald me and @nc4rillo were investigating it yesterday
we thought of doing two-pronged approach on window transparency
on Windows 7, we will do the traditional GDI Layers
on Win8+, it'll be the Direct Composition API
but first we will need to fix the bug that @Karnah encountered
@nc4rrillo correct me if i'm wrong on these :))
if you can lend a hand on fixing that bug then that'll be awesome :smile:
Benedikt Stebner
@Gillibald
Jun 21 2018 13:30
I thought the same about treating Windows 7 differently :smile:
Will definitely have a look at it.
Nelson Carrillo
@nc4rrillo
Jun 21 2018 15:14
Yes sounds right
Jumar Macato
@jmacato
Jun 21 2018 15:47
image.png
It's quite jarring to be honest, i tried all possible combinations of Immediate/Deferred renderers
and Skia/Direct2D
Vsevolod Pilipenko
@Karnah
Jun 21 2018 15:49
@jmacato, this is the same bug, which I encountered?
Jumar Macato
@jmacato
Jun 21 2018 15:49
Yes
Vsevolod Pilipenko
@Karnah
Jun 21 2018 15:50
Resize window is clearing background. May be it will help you
Jumar Macato
@jmacato
Jun 21 2018 15:51
Well yeah, that works but then it'll just happen again whenever arrange/measure triggers
Steven Kirk
@grokys
Jun 21 2018 16:08
the reason that's happening, is that with a Transparent background, there is nothing to overwrite the previously drawn stuff
it's kind of by design
i guess we could make it such that a transparent background on a window gets drawn as white
but that wouldn't help with actual transparent windows
hmm
actually, no - ignore what i just said
that line should be overwriting whatever was previously there with transparent
btw, #1684 is now ready for review, with caveats
Nelson Carrillo
@nc4rrillo
Jun 21 2018 16:43
Managed to fix the redrawing issue with transparency by calling context.PlatformImpl.Clear with a transparent color on the root visual
in ImmediateRenderer at least
Steven Kirk
@grokys
Jun 21 2018 17:43
Thing is, that's what that line should be doing for the deferred renderer
Not sure why it's not working?
Benedikt Stebner
@Gillibald
Jun 21 2018 17:52
Is that layer marked dirty?
Nelson Carrillo
@nc4rrillo
Jun 21 2018 18:09
Yeah perhaps it’s something with marking the layer dirty