toggle menu
korge-root
5.1.0
common
switch theme
search in API
korge-foundation
/
korlibs.math.geom.binpack
/
BinPacker
Bin
Packer
class
BinPacker
(
val
size
:
Size
,
val
algo
:
BinPacker.Algo
=
MaxRects(size)
)
Members
Constructors
Bin
Packer
Link copied to clipboard
constructor
(
size
:
Size
,
algo
:
BinPacker.Algo
=
MaxRects(size)
)
Types
Algo
Link copied to clipboard
interface
Algo
Companion
Link copied to clipboard
object
Companion
Image
Do
Not
Fit
Exception
Link copied to clipboard
class
ImageDoNotFitException
(
val
width
:
Double
,
val
height
:
Double
,
val
packer
:
BinPacker
)
:
Throwable
Result
Link copied to clipboard
class
Result
<
T
>
(
val
maxWidth
:
Double
,
val
maxHeight
:
Double
,
val
items
:
List
<
Pair
<
T
,
Rectangle
?
>
>
)
Properties
algo
Link copied to clipboard
val
algo
:
BinPacker.Algo
allocated
Link copied to clipboard
val
allocated
:
FastArrayList
<
Rectangle
>
height
Link copied to clipboard
val
height
:
Double
size
Link copied to clipboard
val
size
:
Size
width
Link copied to clipboard
val
width
:
Double
Functions
add
Link copied to clipboard
fun
add
(
width
:
Double
,
height
:
Double
)
:
Rectangle
fun
add
(
width
:
Float
,
height
:
Float
)
:
Rectangle
fun
add
(
width
:
Int
,
height
:
Int
)
:
Rectangle
add
Batch
Link copied to clipboard
fun
addBatch
(
items
:
Iterable
<
Size
>
)
:
List
<
Rectangle
?
>
fun
<
T
>
addBatch
(
items
:
Iterable
<
T
>
,
getSize
:
(
T
)
->
Size
)
:
BinPacker.Result
<
T
>
add
Batch
Link copied to clipboard
fun
<
T
>
BinPacker.Algo
.
addBatch
(
items
:
Iterable
<
T
>
,
getSize
:
(
T
)
->
Size
)
:
List
<
Pair
<
T
,
Rectangle
?
>
>
add
Or
Null
Link copied to clipboard
fun
addOrNull
(
width
:
Double
,
height
:
Double
)
:
Rectangle
?
fun
addOrNull
(
width
:
Float
,
height
:
Float
)
:
Rectangle
?
fun
addOrNull
(
width
:
Int
,
height
:
Int
)
:
Rectangle
?