Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkottieViewController.h
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3#ifndef SkottieViewController_DEFINED
4#define SkottieViewController_DEFINED
5
7
8#import <UIKit/UIKit.h>
9
10// An abstraction of the Skottie module into Obective-C.
12- (void)draw:(CGRect)rect toCanvas:(SkCanvas*)canvas atSize:(CGSize)size;
13
14// Return the current paused state.
15- (bool)isPaused;
16
17// When set, pauses at end of loop.
18- (void)setStopAtEnd:(bool)stop;
19
20// Load an animation from a Lottie JSON file. Returns Yes on success.
21- (bool)loadAnimation:(NSData*)d;
22
23// Jump to the specified location in the animation.
24- (void)seek:(float)seconds;
25
26// Toggle paused mode. Return paused state.
27- (bool)togglePaused;
28
29// Return the default size of the Lottie animation.
30- (CGSize)size;
31
32// Return the length of the animation loop.
34
35// Return the current position in the animation in seconds (between zero and
36// animationDurationSeconds).
37- (float)currentTime;
38@end
39
40#endif // SkottieViewController_DEFINED
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27