toggle menu
korge-root
5.1.0
common
switch theme
search in API
korge-core
/
korlibs.image.atlas
/
AtlasPacker
Atlas
Packer
object
AtlasPacker
Members
Types
Atlas
Result
Link copied to clipboard
data
class
AtlasResult
<
T
>
(
val
tex
:
Bitmap32
,
val
atlas
:
Atlas
,
val
packedItems
:
List
<
AtlasPacker.Entry
<
T
>
>
)
:
AtlasLookup
Entry
Link copied to clipboard
data
class
Entry
<
T
>
(
val
item
:
T
,
val
originalSlice
:
BmpSlice
,
val
slice
:
BmpSlice32
,
val
rectWithBorder
:
Rectangle
,
val
rect
:
Rectangle
)
Result
Link copied to clipboard
data
class
Result
<
T
>
(
val
atlases
:
List
<
AtlasPacker.AtlasResult
<
T
>
>
)
:
AtlasLookup
Functions
pack
Link copied to clipboard
fun
pack
(
items
:
List
<
BmpSlice
>
,
maxSide
:
Int
=
2048
,
maxTextures
:
Int
=
1
,
borderSize
:
Int
=
2
,
fileName
:
String
=
"atlas.png"
)
:
AtlasPacker.Result
<
BmpSlice
>
@
JvmName
(
name
=
"packPairs"
)
fun
<
T
>
pack
(
items
:
List
<
Pair
<
T
,
BmpSlice
>
>
,
maxSide
:
Int
=
2048
,
maxTextures
:
Int
=
16
,
borderSize
:
Int
=
2
,
fileName
:
String
=
"atlas.png"
)
:
AtlasPacker.Result
<
T
>