Closed dbriard closed 1 year ago
@Gillibald could it be the result of "proper opacity" with clip rects?
Only possible if UseOpacitySaveLayer is enabled
@dbriard Please provide a minimal repro and I will have a look
Only possible if UseOpacitySaveLayer is enabled
@dbriard Please provide a minimal repro and I will have a look
@Gillibald @kekekeks
Thanks for looking at this issue guys. The Opacity bug only happen when UseOpacitySaveLayer is enabled. Here is minimal repro:
When writting this repro, I run into a new refresh bug: (happen with SaveLayer on or off)
Run the app -> the space around the image is not what I asked for, part of the image is missing at left and top.
Change anything that refresh the image (opacity or blur slider, or resize the window), the rendering is now correct (not clipped)
The image is in a border with uniform padding
`
</Border>`
It is loaded in Window's Loaded event:
private void OnLoaded(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
var loader = AvaloniaLocator.Current.GetService<IAssetLoader>();
var s = loader.Open(new Uri("avares://AvaloniaOpacityBug/hirsch-899118_640.jpg"));
var bitmap = SKBitmap.Decode(s);
image.Source = bitmap;
}
When the render function is called again without changing the sliders or resizing, for example when I ctrl+tab between VS and the app, the bug is still present, I have to change sliders or resize to remove it...
and the values in the custom draw op are the same when the issue is visible or not:
The issue is present in the designer too:
It is not present with the Avalonia Image, only with the custom draw image in the sample, which basically is the Avalonia image with IImage replaced with SKBitmap and render replaced with custom draw.
Hope that help...
Describe the bug I have a custom control that use CustomDrawOperation to blur an image. ClipToBounds is false on element and its ancestors... The custom draw operation draw outside of the element bounds (what I want to do). But when I set opacity to something different from 1, my element get clipped to its bounds (what I never asked for)
Expected behavior Opacity on element with CustomDrawOperation should NOT clip to bounds, just change the opacity...
Screenshots Blur with Opacity=1
Same Blur with Opacity < 1 (the element is clipped, I don't want that).
Desktop (please complete the following information):
Additional context Add any other context about the problem here.