Definition at line 28 of file SkottieView.java.
◆ SkottieRenderer()
Definition at line 35 of file SkottieView.java.
35 {
36 this.mAnimation = mAnimation;
37 this.mBackground = mBackground;
38 }
◆ finalize()
void org.skia.jetski.util.SkottieRenderer.finalize |
( |
| ) |
throws Throwable |
|
inlineprotected |
◆ getAnimation()
◆ onRenderFrame()
void org.skia.jetski.util.SkottieRenderer.onRenderFrame |
( |
Canvas |
canvas, |
|
|
long |
ms |
|
) |
| |
|
inlineprotected |
Callback for frame content.
Invoked once per (vsync'ed) frame.
Reimplemented from org.skia.jetski.util.SurfaceRenderer.
Definition at line 47 of file SkottieView.java.
47 {
48 if(mPlaying) {
49 canvas.drawColor(mBackground);
50 double t = (double)ms / 1000 % mAnimation.
getDuration();
52
53 float s = Math.min(mSurfaceWidth / mAnimation.
getWidth(),
55 canvas.save();
56 canvas.concat(
new Matrix().translate((mSurfaceWidth -
s*mAnimation.
getWidth())/2,
59
61 canvas.restore();
62 }
63 }
void render(Canvas canvas)
SK_API sk_sp< PrecompileColorFilter > Matrix()
◆ onSurfaceInitialized()
void org.skia.jetski.util.SkottieRenderer.onSurfaceInitialized |
( |
Surface |
surface | ) |
|
|
inlineprotected |
◆ pause()
void org.skia.jetski.util.SkottieRenderer.pause |
( |
| ) |
|
|
inlinepackage |
Definition at line 71 of file SkottieView.java.
71 {
72 if (mPlaying) {
73 mPlaying = false;
74 }
75 }
◆ play()
void org.skia.jetski.util.SkottieRenderer.play |
( |
| ) |
|
|
inlinepackage |
Definition at line 65 of file SkottieView.java.
65 {
66 if (!mPlaying) {
67 mPlaying = true;
68 }
69 }
◆ release()
void org.skia.jetski.util.SkottieRenderer.release |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file:
- third_party/skia/platform_tools/android/apps/jetski/src/main/java/org/skia/jetski/util/SkottieView.java