Package icyllis.arc3d.sketch.shaders
Class RRectShader
java.lang.Object
icyllis.arc3d.sketch.shaders.RRectShader
- All Implemented Interfaces:
RefCounted
,Shader
A shader that produces rounded rectangle effects, only 4-slice circular
rounded rect is supported. This shader emits single channel coverage modulated
by white alpha values.
-
Field Summary
Fields inherited from interface icyllis.arc3d.sketch.shaders.Shader
LOCAL_MATRIX_AFTER, LOCAL_MATRIX_BEFORE, LOCAL_MATRIX_REPLACE, TILE_MODE_CLAMP, TILE_MODE_DECAL, TILE_MODE_MIRROR, TILE_MODE_REPEAT
-
Method Summary
Modifier and TypeMethodDescriptionfloat
float
float
float
Returns a center point that can divide the rounded rectangle into 4 slices.float
float
getLeft()
float
getRight()
float
float
getTop()
float
float
boolean
static @Nullable @SharedPtr Shader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface icyllis.arc3d.sketch.shaders.Shader
isOpaque, isTriviallyCounted, makeWithLocalMatrix, ref, unref
-
Method Details
-
make
@SharedPtr public static @Nullable @SharedPtr Shader make(@NonNull RRect rrect, float smoothRadius, boolean inverseFill, @Nullable Matrixc localMatrix) -
getLeft
public float getLeft() -
getTop
public float getTop() -
getRight
public float getRight() -
getBottom
public float getBottom() -
getTopLeftRadius
public float getTopLeftRadius() -
getTopRightRadius
public float getTopRightRadius() -
getBottomRightRadius
public float getBottomRightRadius() -
getBottomLeftRadius
public float getBottomLeftRadius() -
getCenterX
public float getCenterX()Returns a center point that can divide the rounded rectangle into 4 slices. -
getCenterY
public float getCenterY() -
getSmoothRadius
public float getSmoothRadius() -
isInverseFill
public boolean isInverseFill()
-