littlekt
0.6.0
common
core
/
com.lehaine.littlekt.graphics.g2d
/
TextureSlice
Texture
Slice
open
class
TextureSlice
(
var
texture
:
Texture
,
x
:
Int
=
0
,
y
:
Int
=
0
,
width
:
Int
=
texture.width
,
height
:
Int
=
texture.height
)
Author
Colton Daily
Constructors
Functions
Properties
Extensions
Constructors
Texture
Slice
Link copied to clipboard
fun
TextureSlice
(
slice
:
TextureSlice
,
x
:
Int
=
0
,
y
:
Int
=
0
,
width
:
Int
=
slice.width
,
height
:
Int
=
slice.height
)
Texture
Slice
Link copied to clipboard
fun
TextureSlice
(
texture
:
Texture
,
x
:
Int
=
0
,
y
:
Int
=
0
,
width
:
Int
=
texture.width
,
height
:
Int
=
texture.height
)
Functions
flip
H
Link copied to clipboard
fun
flipH
(
)
flip
V
Link copied to clipboard
fun
flipV
(
)
set
Slice
Link copied to clipboard
fun
setSlice
(
slice
:
TextureSlice
)
fun
setSlice
(
u
:
Float
,
v
:
Float
,
u2
:
Float
,
v2
:
Float
)
fun
setSlice
(
x
:
Int
,
y
:
Int
,
width
:
Int
,
height
:
Int
)
fun
setSlice
(
slice
:
TextureSlice
,
x
:
Int
,
y
:
Int
,
width
:
Int
,
height
:
Int
)
slice
Link copied to clipboard
fun
slice
(
sliceWidth
:
Int
,
sliceHeight
:
Int
,
border
:
Int
=
0
)
:
Array
<
Array
<
TextureSlice
>
>
Slice this
TextureSlice
into smaller slices.
to
String
Link copied to clipboard
open
override
fun
toString
(
)
:
String
Properties
height
Link copied to clipboard
var
height
:
Int
is
Flip
H
Link copied to clipboard
val
isFlipH
:
Boolean
is
Flip
V
Link copied to clipboard
val
isFlipV
:
Boolean
offset
X
Link copied to clipboard
val
offsetX
:
Int
offset
Y
Link copied to clipboard
val
offsetY
:
Int
original
Height
Link copied to clipboard
var
originalHeight
:
Int
original
Width
Link copied to clipboard
var
originalWidth
:
Int
packed
Height
Link copied to clipboard
val
packedHeight
:
Int
packed
Width
Link copied to clipboard
val
packedWidth
:
Int
rotated
Link copied to clipboard
var
rotated
:
Boolean
=
false
texture
Link copied to clipboard
var
texture
:
Texture
u
Link copied to clipboard
var
u
:
Float
u2
Link copied to clipboard
var
u2
:
Float
v
Link copied to clipboard
var
v
:
Float
v2
Link copied to clipboard
var
v2
:
Float
virtual
Frame
Link copied to clipboard
var
virtualFrame
:
Rect
?
=
null
width
Link copied to clipboard
var
width
:
Int
x
Link copied to clipboard
var
x
:
Int
y
Link copied to clipboard
var
y
:
Int
Extensions
to
Drawable
Link copied to clipboard
fun
TextureSlice
.
toDrawable
(
)
:
TextureSliceDrawable