Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Member Functions | Package Functions | List of all members
org.skia.jetski.SamplingOptions Class Reference

Classes

enum  FilterMode
 
enum  MipmapMode
 

Public Member Functions

 SamplingOptions ()
 
 SamplingOptions (FilterMode f)
 
 SamplingOptions (FilterMode f, MipmapMode m)
 
 SamplingOptions (float cubicCoeffB, float cubicCoeffC)
 

Static Public Member Functions

static SamplingOptions MITCHELL ()
 
static SamplingOptions CATMULLROM ()
 

Package Functions

int getNativeDesc ()
 
float getCubicCoeffB ()
 
float getCubicCoeffC ()
 

Detailed Description

Definition at line 10 of file SamplingOptions.java.

Constructor & Destructor Documentation

◆ SamplingOptions() [1/4]

org.skia.jetski.SamplingOptions.SamplingOptions ( )
inline

Definition at line 28 of file SamplingOptions.java.

28 {
29 this(FilterMode.NEAREST);
30 }

◆ SamplingOptions() [2/4]

org.skia.jetski.SamplingOptions.SamplingOptions ( FilterMode  f)
inline

Definition at line 32 of file SamplingOptions.java.

32 {
33 this(f, MipmapMode.NONE);
34 }
SkMipmapMode

◆ SamplingOptions() [3/4]

org.skia.jetski.SamplingOptions.SamplingOptions ( FilterMode  f,
MipmapMode  m 
)
inline

Definition at line 36 of file SamplingOptions.java.

36 {
37 mFilter = f;
38 mMipmap = m;
39 mUseCubic = false;
40 }

◆ SamplingOptions() [4/4]

org.skia.jetski.SamplingOptions.SamplingOptions ( float  cubicCoeffB,
float  cubicCoeffC 
)
inline

Definition at line 42 of file SamplingOptions.java.

42 {
43 mFilter = FilterMode.NEAREST;
44 mMipmap = MipmapMode.NONE;
45 mCubicCoeffB = cubicCoeffB;
46 mCubicCoeffC = cubicCoeffC;
47 mUseCubic = true;
48 }

Member Function Documentation

◆ CATMULLROM()

static SamplingOptions org.skia.jetski.SamplingOptions.CATMULLROM ( )
inlinestatic

Definition at line 54 of file SamplingOptions.java.

54 {
55 return new SamplingOptions(0.0f, 1/2.0f);
56 }

◆ getCubicCoeffB()

float org.skia.jetski.SamplingOptions.getCubicCoeffB ( )
inlinepackage

Definition at line 90 of file SamplingOptions.java.

90 {
91 return mCubicCoeffB;
92 }

◆ getCubicCoeffC()

float org.skia.jetski.SamplingOptions.getCubicCoeffC ( )
inlinepackage

Definition at line 94 of file SamplingOptions.java.

94 {
95 return mCubicCoeffC;
96 }

◆ getNativeDesc()

int org.skia.jetski.SamplingOptions.getNativeDesc ( )
inlinepackage

Definition at line 59 of file SamplingOptions.java.

59 {
60 // Encode all options except coefficients in a bit field:
61 //
62 // b0 -> useCubic
63 // b1 -> filter
64 // b2,3 -> mipmap
65
66 int desc = mUseCubic ? 0x01 : 0x00;
67
68 switch (mFilter) {
69 case NEAREST:
70 break;
71 case LINEAR:
72 desc |= 0x02;
73 break;
74 }
75
76 switch (mMipmap) {
77 case NONE:
78 break;
79 case NEAREST:
80 desc |= 0x04;
81 break;
82 case LINEAR:
83 desc |= 0x08;
84 break;
85 }
86
87 return desc;
88 }

◆ MITCHELL()

static SamplingOptions org.skia.jetski.SamplingOptions.MITCHELL ( )
inlinestatic

Definition at line 50 of file SamplingOptions.java.

50 {
51 return new SamplingOptions(1/3.0f, 1/3.0f);
52 }

The documentation for this class was generated from the following file: