Package icyllis.arc3d.core.shaders
Class ImageShader
java.lang.Object
icyllis.arc3d.core.RefCnt
icyllis.arc3d.core.shaders.ImageShader
- All Implemented Interfaces:
RefCounted
,Shader
-
Field Summary
Modifier and TypeFieldDescriptionfinal @SharedPtr Image
final SamplingOptions
final Rect2f
final int
final int
Fields inherited from interface icyllis.arc3d.core.shaders.Shader
TILE_MODE_CLAMP, TILE_MODE_DECAL, TILE_MODE_MIRROR, TILE_MODE_REPEAT
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Override this method to invoke de-allocation of the underlying resource.getImage()
int
int
static @SharedPtr Shader
make
(@SharedPtr Image image, int tileModeX, int tileModeY, SamplingOptions sampling, Matrixc localMatrix) static float[]
makeCubicMatrix
(float B, float C) Create a 4x4 row major matrix for Mitchell–Netravali filters.static @SharedPtr Shader
makeSubset
(@SharedPtr Image image, Rect2fc subset, int tileModeX, int tileModeY, SamplingOptions sampling, Matrixc localMatrix) static Rect2f
preparePaintForDrawImageRect
(@RawPtr Image image, SamplingOptions sampling, Rect2fc src, Rect2fc dst, boolean strictSubset, Paint paint) Methods inherited from class icyllis.arc3d.core.RefCnt
create, create, getRefCnt, getRefCntAcquire, getRefCntVolatile, move, move, ref, unique, unref
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface icyllis.arc3d.core.RefCounted
ref, unref
Methods inherited from interface icyllis.arc3d.core.shaders.Shader
isOpaque, makeWithLocalMatrix
-
Field Details
-
mImage
-
mSampling
-
mTileModeX
public final int mTileModeX -
mTileModeY
public final int mTileModeY -
mSubset
-
-
Method Details
-
make
@Nullable @SharedPtr public static @SharedPtr Shader make(@SharedPtr @SharedPtr Image image, int tileModeX, int tileModeY, SamplingOptions sampling, @Nullable Matrixc localMatrix) -
makeSubset
@Nullable @SharedPtr public static @SharedPtr Shader makeSubset(@SharedPtr @SharedPtr Image image, Rect2fc subset, int tileModeX, int tileModeY, SamplingOptions sampling, @Nullable Matrixc localMatrix) -
deallocate
protected void deallocate()Description copied from class:RefCnt
Override this method to invoke de-allocation of the underlying resource.- Specified by:
deallocate
in classRefCnt
-
getImage
-
getSampling
-
getTileModeX
public int getTileModeX() -
getTileModeY
public int getTileModeY() -
getSubset
-
makeCubicMatrix
public static float[] makeCubicMatrix(float B, float C) Create a 4x4 row major matrix for Mitchell–Netravali filters. -
preparePaintForDrawImageRect
-