Skip to content

ResourceBorderTexture ​

The ResourceBorderTexture class extends ResourceTexture to render textures with configurable borders. It calculates relative sizes for corners, edges, and the central area, enabling detailed customization for UI backgrounds and buttons.

Basic Properties ​

FieldDescription
boderSizeThe size of the border corners
imageSizeThe overall size of the texture image
imageLocationThe resource location of the texture image

APIs ​

setBoderSize ​

Sets the size of the border corners.

java
resourceBorderTexture.setBoderSize(5, 5);

setImageSize ​

Sets the overall size of the texture image.

java
resourceBorderTexture.setImageSize(200, 150);

Released under the MIT License.