Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Enumerations
SkCodecAnimation Namespace Reference

Enumerations

enum class  DisposalMethod { kKeep = 1 , kRestoreBGColor = 2 , kRestorePrevious = 3 }
 
enum class  Blend { kSrcOver , kSrc }
 

Enumeration Type Documentation

◆ Blend

enum class SkCodecAnimation::Blend
strong

How to blend the current frame.

Enumerator
kSrcOver 

Blend with the prior frame as if using SkBlendMode::kSrcOver.

kSrc 

Blend with the prior frame as if using SkBlendMode::kSrc.

This frame's pixels replace the destination pixels.

Definition at line 46 of file SkCodecAnimation.h.

46 {
47 /**
48 * Blend with the prior frame as if using SkBlendMode::kSrcOver.
49 */
51
52 /**
53 * Blend with the prior frame as if using SkBlendMode::kSrc.
54 *
55 * This frame's pixels replace the destination pixels.
56 */
57 kSrc,
58 };
@ kSrcOver
r = s + (1-sa)*d

◆ DisposalMethod

This specifies how the next frame is based on this frame.

Names are based on the GIF 89a spec.

The numbers correspond to values in a GIF.

Enumerator
kKeep 

The next frame should be drawn on top of this one.

In a GIF, a value of 0 (not specified) is also treated as Keep.

kRestoreBGColor 

Similar to Keep, except the area inside this frame's rectangle should be cleared to the BackGround color (transparent) before drawing the next frame.

kRestorePrevious 

The next frame should be drawn on top of the previous frame - i.e. disregarding this one.

In a GIF, a value of 4 is also treated as RestorePrevious.

Definition at line 19 of file SkCodecAnimation.h.

19 {
20 /**
21 * The next frame should be drawn on top of this one.
22 *
23 * In a GIF, a value of 0 (not specified) is also treated as Keep.
24 */
25 kKeep = 1,
26
27 /**
28 * Similar to Keep, except the area inside this frame's rectangle
29 * should be cleared to the BackGround color (transparent) before
30 * drawing the next frame.
31 */
33
34 /**
35 * The next frame should be drawn on top of the previous frame - i.e.
36 * disregarding this one.
37 *
38 * In a GIF, a value of 4 is also treated as RestorePrevious.
39 */
41 };