quicoli / LottieSharp

Lottie animations for WPF applications
MIT License
208 stars 38 forks source link

Refresh problem #38

Closed AlessandroMiorelli closed 2 years ago

AlessandroMiorelli commented 4 years ago

I'm testing your library, but I have refresh problem Try this json LT-Test_noLogo.zip

This is the result immagine

Regards Alessandro

wangjinming01 commented 3 years ago

public Disposable PushMask(RectangleF rect, float alpha, Path path = null) { if (alpha >= 1 && path == null) { //CurrentRenderTarget.PushAxisAlignedClip(rect, CurrentRenderTarget.AntialiasMode);

            return new Disposable(() =>
            {
                //CurrentRenderTarget.PopAxisAlignedClip();
            });
        }

Comment two lines ,it works ok.

AlessandroMiorelli commented 3 years ago

Thank you @wangjinming01, it works. Another question, if I have two LottieAnimationView on the same form and I load the same json I have this exception

SharpDX.SharpDXException: 'HRESULT: [0x88990012], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_FACTORY/WrongFactory], Message: Objects used together must be created from the same factory instance.

This doesn't occur if I load different json.

I found an old post, maybe about that, but I don't undestand the solution.

Thank you