Skip to content

ColorRectTexture

Basic Properties

FieldDescription
colorThe color applied to the rectangle
radiusLTTop-left corner radius
radiusLBBottom-left corner radius
radiusRTTop-right corner radius
radiusRBBottom-right corner radius

APIs

setRadius

Sets a uniform radius for all corners.

java
colorRectTexture.setRadius(10);

setLeftRadius

Sets the left-side radii (top and bottom) for the rectangle.

java
colorRectTexture.setLeftRadius(8);

setRightRadius

Sets the right-side radii (top and bottom) for the rectangle.

java
colorRectTexture.setRightRadius(8);

setTopRadius

Sets the top-side radii (left and right) for the rectangle.

java
colorRectTexture.setTopRadius(8);

setBottomRadius

Sets the bottom-side radii (left and right) for the rectangle.

java
colorRectTexture.setBottomRadius(8);

Released under the MIT License.