Skip to content

Preliminary

GUI Texture is widely used for background setup, image dispaly, etc. LDLib provides lots of different textures. Textures have some generic functions.

Basic Properties

FieldDescription
xOffsetHorizontal offset
yOffsetVertical offset
scaleScale factor (default is 1)
rotationRotation angle in degrees

APIs

rotate

Sets the rotation angle.

java
texture.rotate(45);

scale

Sets the scale factor.

java
texture.scale(1.5);

transform

Sets the horizontal and vertical offset.

java
texture.transform(10, 20);

copy

Creates a copy of the texture.

java
var copiedTexture = texture.copy();

Released under the MIT License.