package grenier

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'bin t
val empty : 'bin t
val add_bin : 'bin -> int -> int -> 'bin t -> 'bin t
type !'tag box = {
  1. tag : 'tag;
  2. width : int;
  3. height : int;
  4. allow_rotation : bool;
}
val box : ?allow_rotation:bool -> 'tag -> int -> int -> 'tag box
type (!'bin, !'tag) rect = {
  1. x : int;
  2. y : int;
  3. w : int;
  4. h : int;
  5. rotated : bool;
  6. bin : 'bin;
  7. box : 'tag box;
}
type heuristic = [
  1. | `Area_fit
  2. | `Bottom_left
  3. | `Long_side_fit
  4. | `Short_side_fit
]
val insert : 'bin t -> ?heuristic:heuristic -> 'tag box -> 'bin t * ('bin, 'tag) rect option
val insert_batch : 'bin t -> ?heuristic:heuristic -> 'tag box list -> 'bin t * ('bin, 'tag) rect option list
val insert_global : 'bin t -> ?heuristic:heuristic -> 'tag box list -> 'bin t * ('bin, 'tag) rect option list