Package io.github.humbleui.skija
Class CubicResampler
- java.lang.Object
-
- io.github.humbleui.skija.CubicResampler
-
- All Implemented Interfaces:
SamplingMode
public class CubicResampler extends java.lang.Object implements SamplingMode
Specify B and C (each between 0...1) to create a shader that applies the corresponding cubic reconstruction filter to the image.
Example values:
- B = 1/3, C = 1/3
- "Mitchell" filter
- B = 0, C = 1/2
- "Catmull-Rom" filter
See
- "Reconstruction Filters in Computer Graphics" Don P. Mitchell, Arun N. Netravali, 1988 https://www.cs.utexas.edu/~fussell/courses/cs384g-fall2013/lectures/mitchell/Mitchell.pdf
- Desmos worksheet https://www.desmos.com/calculator/aghdpicrvr
- Nice overview https://entropymine.com/imageworsener/bicubic/
-
-
Field Summary
Fields Modifier and Type Field Description float_Bfloat_C-
Fields inherited from interface io.github.humbleui.skija.SamplingMode
CATMULL_ROM, DEFAULT, LINEAR, MITCHELL
-
-
Constructor Summary
Constructors Constructor Description CubicResampler(float b, float c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long_pack()protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)floatgetB()floatgetC()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
_pack
@Internal public long _pack()
- Specified by:
_packin interfaceSamplingMode
-
getB
public float getB()
-
getC
public float getC()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-