java.lang.Object
juuxel.libninepatch.NinePatch.Builder<T>
- Type Parameters:
T- the texture type
A builder for
NinePatch.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newNinePatchfrom this builder.cornerSize(int size)Sets the corner size of the rendered rectangle.cornerSize(int width, int height)Sets the corner size of the rendered rectangle.cornerUv(float uv)Sets the corner UV size in the texture.cornerUv(float u, float v)Sets the corner UV sizes in the texture.mode(NinePatch.Mode mode)Sets the rendering mode of this builder.tileSize(int size)Sets the tile size of the rendered texture when the mode isNinePatch.Mode.TILING.tileSize(int width, int height)Sets the tile size of the rendered texture when the mode isNinePatch.Mode.TILING.
-
Method Details
-
cornerSize
Sets the corner size of the rendered rectangle.- Parameters:
width- the corner widthheight- the corner height- Returns:
- this builder
-
cornerSize
Sets the corner size of the rendered rectangle.- Parameters:
size- the corner width and height- Returns:
- this builder
-
cornerUv
Sets the corner UV sizes in the texture.- Parameters:
u- the width of the corner in the texture as a fraction from 0 to 1v- the height of the corner in the texture as a fraction from 0 to 1- Returns:
- this builder
-
cornerUv
Sets the corner UV size in the texture.- Parameters:
uv- the width and height of the corner in the texture as a fraction from 0 to 1- Returns:
- this builder
-
tileSize
Sets the tile size of the rendered texture when the mode isNinePatch.Mode.TILING.- Parameters:
width- the tile widthheight- the tile height- Returns:
- this builder
-
tileSize
Sets the tile size of the rendered texture when the mode isNinePatch.Mode.TILING.- Parameters:
size- the tile width and height- Returns:
- this builder
-
mode
Sets the rendering mode of this builder.- Parameters:
mode- the new rendering mode- Returns:
- this builder
-
build
Creates a newNinePatchfrom this builder.- Returns:
- the created nine-patch renderer
-