SkiaSharp.Extended icon indicating copy to clipboard operation
SkiaSharp.Extended copied to clipboard

[BUG] Issue with rendering!

Open georgeemr opened this issue 1 year ago • 6 comments

Hi, I'm trying to implement the component but with some animations I get a bad result. Anyone know what I'm missing?

image

<?xml version="1.0" encoding="utf-8" ?>
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
               xmlns:skia="clr-namespace:SkiaSharp.Extended.UI.Controls;assembly=SkiaSharp.Extended.UI"
               Color="Transparent"
               x:Class="X.Views.PopUps.LoadingPopup">
    <ContentView>
        <Border BackgroundColor="WhiteSmoke"
                Style="{StaticResource BorderLoty}"
                Padding="15"
                Stroke="Black"
                WidthRequest="250">

            <VerticalStackLayout HorizontalOptions="Center"
                                 VerticalOptions="Center">
               
                <skia:SKLottieView RepeatCount="-1"
                                   RepeatMode="Reverse"
                                   Source="Cat.json"
                                   WidthRequest="250"
                                   HeightRequest="150" />

                <Label HorizontalOptions="Center"
                       Text="Wait"
                       VerticalOptions="Center"
                       HorizontalTextAlignment="Center"></Label>
            </VerticalStackLayout>
        </Border>
    </ContentView>
</toolkit:Popup>

This is the lottie: https://lottiefiles.com/animations/loader-cat-dWUie0iIVk?from=search

Basic Information

I'm using version 2.0.0-preview.92

georgeemr avatar Apr 04 '24 05:04 georgeemr

Are you able to attach a repro sample? I tested now and it seemed to work fine. Maybe there is some configuration issues or some issue with the version of skia, maybe and the toolkit versions.

mattleibow avatar Apr 08 '24 09:04 mattleibow

Sure, I create a project from scratch and the issue. persist.

image

Maui 8.0.7 image

https://1drv.ms/u/s!AlTIxW_ExT1enfFcWZ8yhgAkMaYebA?e=OGdotf

georgeemr avatar Apr 10 '24 06:04 georgeemr

I am also running into a similar issue. Loading in a checkmark animation has both a strange checkmark shape and the animation surrounding the circle appears to be wrong.

repo: https://github.com/matthericks/lottie-broken-animation link to animation in Lottie files: https://app.lottiefiles.com/animation/71e19298-edbb-4d04-a06c-5bd891bea298?panel=download animation file: success.json

screenshot of checkbox in app: Screenshot 2024-04-19 at 1 05 43 PM

screenshot of expected checkbox: Screenshot 2024-04-19 at 1 19 53 PM

matthericks avatar Apr 19 '24 18:04 matthericks

Thanks @matthericks for this lottie. It appears to be a bug in skia directly: https://skottie.skia.org/21af4dec27795f93f0ab6e5f803ea330?h=512&w=512

I see this issue may be the related one: https://issues.skia.org/issues/40043184

There is a comment about Expressions not being supported yet. Do you know if your lottie file uses Expressions?

mattleibow avatar Apr 22 '24 19:04 mattleibow

@mattleibow it does not, but that link also had some discussion on the file where I was seeing the issues, and it looks like the checkmark was created using absolute instead of relative coordinates. I updated my file with those coordinates and everything works perfectly.

thanks!

matthericks avatar Apr 24 '24 17:04 matthericks

I also have this issue with a some Lottie files I downloaded from LottieFiles. Is there a solution for converting these files to make them work?

Edit: Never mind. ChatGPT did the work for me :)

idiidi avatar Aug 28 '24 14:08 idiidi