The binpack Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The binpack Reference Manual

This is the binpack Reference Manual, version 0.0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 14:11:56 2021 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

1.1 binpack

Author

Bart Botta

License

MIT

Description

Rectangle packer for sprite/texture atlases

Version

0.0.1

Dependency

alexandria

Source

binpack.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

2.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.1 binpack.asd

Location

binpack.asd

Systems

binpack (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.2 binpack/packages.lisp

Parent

binpack (system)

Location

packages.lisp

Packages

Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.3 binpack/common.lisp

Dependency

packages.lisp (file)

Parent

binpack (system)

Location

common.lisp

Exported Definitions
Internal Definitions

print-rect (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.4 binpack/maxrects.lisp

Dependency

common.lisp (file)

Parent

binpack (system)

Location

maxrects.lisp

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

2.1.5 binpack/binpack.lisp

Dependency

maxrects.lisp (file)

Parent

binpack (system)

Location

binpack.lisp

Exported Definitions
Internal Definitions

%auto-pack (function)


Next: , Previous: , Up: Top   [Contents][Index]

3 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

3.1 binpack/2

Source

packages.lisp (file)

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

3.2 binpack/common

Source

packages.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions
Internal Definitions

print-rect (function)


Previous: , Up: Packages   [Contents][Index]

3.3 binpack

Source

packages.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

4.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.1 Macros

Macro: with-rect (ID X Y W H) RECT &body BODY
Package

binpack/common

Source

common.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.2 Functions

Function: auto-pack RECTS &key WIDTH HEIGHT AUTO-SIZE-GRANULARITY-X AUTO-SIZE-GRANULARITY-Y OPTIMIZE-PACK EXPAND-MODE
Package

binpack

Source

binpack.lisp (file)

Function: containsp OUTER INNER
Package

binpack/common

Source

common.lisp (file)

Function: intersectsp RECT1 RECT2
Package

binpack/common

Source

common.lisp (file)

Function: pack RECTS WIDTH HEIGHT
Package

binpack

Source

binpack.lisp (file)

Function: pack-1 RECT STATE
Package

binpack

Source

binpack.lisp (file)

Function: point-in-rect RECT PX PY
Package

binpack/common

Source

common.lisp (file)

Function: rect ID X Y W H
Package

binpack/common

Source

common.lisp (file)

Function: rect* W H &optional ID
Package

binpack/common

Source

common.lisp (file)

Function: rects-bounds RECTS
Package

binpack/common

Source

common.lisp (file)

Function: sort-rects/area-desc RECTS
Package

binpack/common

Source

common.lisp (file)

Function: sort-rects/aspect*area-desc RECTS
Package

binpack/common

Source

common.lisp (file)

Function: sort-rects/height-desc RECTS
Package

binpack/common

Source

common.lisp (file)

Function: sort-rects/longest-side-desc RECTS
Package

binpack/common

Source

common.lisp (file)

Function: sort-rects/perimeter-desc RECTS
Package

binpack/common

Source

common.lisp (file)

Function: sort-rects/w+h-desc RECTS
Package

binpack/common

Source

common.lisp (file)

Function: sort-rects/width-desc RECTS
Package

binpack/common

Source

common.lisp (file)

Function: total-pixels RECTS
Package

binpack/common

Source

common.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.3 Generic functions

Generic Function: algorithm OBJECT
Package

binpack/common

Methods
Method: algorithm (PACK-STATE pack-state)

automatically generated reader method

Source

common.lisp (file)

Generic Function: h OBJECT
Generic Function: (setf h) NEW-VALUE OBJECT
Package

binpack/common

Methods
Method: h (CONDITION packing-failed)
Source

common.lisp (file)

Method: h (RECT rect)

automatically generated reader method

Source

common.lisp (file)

Method: (setf h) NEW-VALUE (RECT rect)

automatically generated writer method

Source

common.lisp (file)

Generic Function: height OBJECT
Package

binpack/common

Methods
Method: height (PACK-STATE pack-state)

automatically generated reader method

Source

common.lisp (file)

Generic Function: id OBJECT
Package

binpack/common

Methods
Method: id (RECT rect)

automatically generated reader method

Source

common.lisp (file)

Generic Function: page OBJECT
Generic Function: (setf page) NEW-VALUE OBJECT
Package

binpack/common

Methods
Method: page (RECT rect)

automatically generated reader method

Source

common.lisp (file)

Method: (setf page) NEW-VALUE (RECT rect)

automatically generated writer method

Source

common.lisp (file)

Generic Function: page-policy OBJECT
Generic Function: (setf page-policy) NEW-VALUE OBJECT
Package

binpack/common

Methods
Method: page-policy (PACK-STATE pack-state)

automatically generated reader method

Source

common.lisp (file)

Method: (setf page-policy) NEW-VALUE (PACK-STATE pack-state)

automatically generated writer method

Source

common.lisp (file)

Generic Function: rect-initargs RECT
Package

binpack/common

Source

common.lisp (file)

Method Combination

append (short method combination)

Options: :most-specific-first

Methods
Method: rect-initargs (R rect) append
Generic Function: shaping OBJECT
Generic Function: (setf shaping) NEW-VALUE OBJECT
Package

binpack/common

Methods
Method: shaping (PACK-STATE pack-state)

automatically generated reader method

Source

common.lisp (file)

Method: (setf shaping) NEW-VALUE (PACK-STATE pack-state)

automatically generated writer method

Source

common.lisp (file)

Generic Function: state OBJECT
Generic Function: (setf state) NEW-VALUE OBJECT
Package

binpack/common

Methods
Method: state (PACK-STATE pack-state)

automatically generated reader method

Source

common.lisp (file)

Method: (setf state) NEW-VALUE (PACK-STATE pack-state)

automatically generated writer method

Source

common.lisp (file)

Generic Function: w OBJECT
Generic Function: (setf w) NEW-VALUE OBJECT
Package

binpack/common

Methods
Method: w (CONDITION packing-failed)
Source

common.lisp (file)

Method: w (RECT rect)

automatically generated reader method

Source

common.lisp (file)

Method: (setf w) NEW-VALUE (RECT rect)

automatically generated writer method

Source

common.lisp (file)

Generic Function: width OBJECT
Package

binpack/common

Methods
Method: width (PACK-STATE pack-state)

automatically generated reader method

Source

common.lisp (file)

Generic Function: x OBJECT
Generic Function: (setf x) NEW-VALUE OBJECT
Package

binpack/common

Methods
Method: x (RECT rect)

automatically generated reader method

Source

common.lisp (file)

Method: (setf x) NEW-VALUE (RECT rect)

automatically generated writer method

Source

common.lisp (file)

Generic Function: y OBJECT
Generic Function: (setf y) NEW-VALUE OBJECT
Package

binpack/common

Methods
Method: y (RECT rect)

automatically generated reader method

Source

common.lisp (file)

Method: (setf y) NEW-VALUE (RECT rect)

automatically generated writer method

Source

common.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.4 Conditions

Condition: packing-failed ()
Package

binpack/common

Source

common.lisp (file)

Direct superclasses

simple-error (condition)

Direct methods
  • h (method)
  • w (method)
Direct slots
Slot: w
Initargs

:w

Readers

w (generic function)

Slot: h
Initargs

:h

Readers

h (generic function)


Previous: , Up: Exported definitions   [Contents][Index]

4.1.5 Classes

Class: pack-state ()
Package

binpack/common

Source

common.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: state
Initargs

:state

Readers

state (generic function)

Writers

(setf state) (generic function)

Slot: algorithm
Initargs

:algorithm

Readers

algorithm (generic function)

Slot: width
Initargs

:width

Readers

width (generic function)

Slot: height
Initargs

:height

Readers

height (generic function)

Slot: shaping
Initargs

:shaping

Readers

shaping (generic function)

Writers

(setf shaping) (generic function)

Slot: page-policy
Initargs

:page-policy

Readers

page-policy (generic function)

Writers

(setf page-policy) (generic function)

Class: rect ()
Package

binpack/common

Source

common.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • rect-initargs (method)
  • page (method)
  • page (method)
  • y (method)
  • y (method)
  • x (method)
  • x (method)
  • h (method)
  • h (method)
  • w (method)
  • w (method)
  • id (method)
Direct slots
Slot: %id
Initargs

:id

Readers

id (generic function)

Slot: %w
Initargs

:w

Readers

w (generic function)

Writers

(setf w) (generic function)

Slot: %h
Initargs

:h

Readers

h (generic function)

Writers

(setf h) (generic function)

Slot: %x
Initargs

:x

Readers

x (generic function)

Writers

(setf x) (generic function)

Slot: %y
Initargs

:y

Readers

y (generic function)

Writers

(setf y) (generic function)

Slot: %page
Readers

page (generic function)

Writers

(setf page) (generic function)


Previous: , Up: Definitions   [Contents][Index]

4.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

4.2.1 Functions

Function: %auto-pack RECTS &key WIDTH HEIGHT AUTO-SIZE-GRANULARITY-X AUTO-SIZE-GRANULARITY-Y EXPAND-MODE
Package

binpack

Source

binpack.lisp (file)

Function: delta-weight WIDTH HEIGHT RECT
Package

binpack

Source

maxrects.lisp (file)

Function: find-free-rect WIDTH HEIGHT RECTS
Package

binpack

Source

maxrects.lisp (file)

Function: grow-rects RECTS DX DY
Package

binpack

Source

maxrects.lisp (file)

Function: normalize-free-space RECTS
Package

binpack

Source

maxrects.lisp (file)

Function: pack-1/mr RECT STATE
Package

binpack

Source

maxrects.lisp (file)

Function: place-rect RECT FREE-RECTS
Package

binpack

Source

maxrects.lisp (file)

Function: print-rect R &optional STREAM
Package

binpack/common

Source

common.lisp (file)

Function: reset-pack/mr STATE WIDTH HEIGHT
Package

binpack

Source

maxrects.lisp (file)

Function: resolve-free-rects RECT FREE-RECTS
Package

binpack

Source

maxrects.lisp (file)

Function: rl RECT
Package

binpack

Source

maxrects.lisp (file)

Function: start-pack/mr WIDTH HEIGHT
Package

binpack

Source

maxrects.lisp (file)

Function: subdivide-rect RECT PLACED
Package

binpack

Source

maxrects.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

4.2.2 Generic functions

Generic Function: pack-state-free-rects PS
Generic Function: (setf pack-state-free-rects) NEW PS
Package

binpack

Methods
Method: pack-state-free-rects (PS pack-state)
Method: (setf pack-state-free-rects) NEW (PS pack-state)
Source

maxrects.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   B   F   L  
Index Entry  Section

B
binpack.asd: The binpack․asd file
binpack/binpack.lisp: The binpack/binpack․lisp file
binpack/common.lisp: The binpack/common․lisp file
binpack/maxrects.lisp: The binpack/maxrects․lisp file
binpack/packages.lisp: The binpack/packages․lisp file

F
File, Lisp, binpack.asd: The binpack․asd file
File, Lisp, binpack/binpack.lisp: The binpack/binpack․lisp file
File, Lisp, binpack/common.lisp: The binpack/common․lisp file
File, Lisp, binpack/maxrects.lisp: The binpack/maxrects․lisp file
File, Lisp, binpack/packages.lisp: The binpack/packages․lisp file

L
Lisp File, binpack.asd: The binpack․asd file
Lisp File, binpack/binpack.lisp: The binpack/binpack․lisp file
Lisp File, binpack/common.lisp: The binpack/common․lisp file
Lisp File, binpack/maxrects.lisp: The binpack/maxrects․lisp file
Lisp File, binpack/packages.lisp: The binpack/packages․lisp file

Jump to:   B   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
A   C   D   F   G   H   I   M   N   P   R   S   T   W   X   Y  
Index Entry  Section

%
%auto-pack: Internal functions

(
(setf h): Exported generic functions
(setf h): Exported generic functions
(setf pack-state-free-rects): Internal generic functions
(setf pack-state-free-rects): Internal generic functions
(setf page): Exported generic functions
(setf page): Exported generic functions
(setf page-policy): Exported generic functions
(setf page-policy): Exported generic functions
(setf shaping): Exported generic functions
(setf shaping): Exported generic functions
(setf state): Exported generic functions
(setf state): Exported generic functions
(setf w): Exported generic functions
(setf w): Exported generic functions
(setf x): Exported generic functions
(setf x): Exported generic functions
(setf y): Exported generic functions
(setf y): Exported generic functions

A
algorithm: Exported generic functions
algorithm: Exported generic functions
auto-pack: Exported functions

C
containsp: Exported functions

D
delta-weight: Internal functions

F
find-free-rect: Internal functions
Function, %auto-pack: Internal functions
Function, auto-pack: Exported functions
Function, containsp: Exported functions
Function, delta-weight: Internal functions
Function, find-free-rect: Internal functions
Function, grow-rects: Internal functions
Function, intersectsp: Exported functions
Function, normalize-free-space: Internal functions
Function, pack: Exported functions
Function, pack-1: Exported functions
Function, pack-1/mr: Internal functions
Function, place-rect: Internal functions
Function, point-in-rect: Exported functions
Function, print-rect: Internal functions
Function, rect: Exported functions
Function, rect*: Exported functions
Function, rects-bounds: Exported functions
Function, reset-pack/mr: Internal functions
Function, resolve-free-rects: Internal functions
Function, rl: Internal functions
Function, sort-rects/area-desc: Exported functions
Function, sort-rects/aspect*area-desc: Exported functions
Function, sort-rects/height-desc: Exported functions
Function, sort-rects/longest-side-desc: Exported functions
Function, sort-rects/perimeter-desc: Exported functions
Function, sort-rects/w+h-desc: Exported functions
Function, sort-rects/width-desc: Exported functions
Function, start-pack/mr: Internal functions
Function, subdivide-rect: Internal functions
Function, total-pixels: Exported functions

G
Generic Function, (setf h): Exported generic functions
Generic Function, (setf pack-state-free-rects): Internal generic functions
Generic Function, (setf page): Exported generic functions
Generic Function, (setf page-policy): Exported generic functions
Generic Function, (setf shaping): Exported generic functions
Generic Function, (setf state): Exported generic functions
Generic Function, (setf w): Exported generic functions
Generic Function, (setf x): Exported generic functions
Generic Function, (setf y): Exported generic functions
Generic Function, algorithm: Exported generic functions
Generic Function, h: Exported generic functions
Generic Function, height: Exported generic functions
Generic Function, id: Exported generic functions
Generic Function, pack-state-free-rects: Internal generic functions
Generic Function, page: Exported generic functions
Generic Function, page-policy: Exported generic functions
Generic Function, rect-initargs: Exported generic functions
Generic Function, shaping: Exported generic functions
Generic Function, state: Exported generic functions
Generic Function, w: Exported generic functions
Generic Function, width: Exported generic functions
Generic Function, x: Exported generic functions
Generic Function, y: Exported generic functions
grow-rects: Internal functions

H
h: Exported generic functions
h: Exported generic functions
h: Exported generic functions
height: Exported generic functions
height: Exported generic functions

I
id: Exported generic functions
id: Exported generic functions
intersectsp: Exported functions

M
Macro, with-rect: Exported macros
Method, (setf h): Exported generic functions
Method, (setf pack-state-free-rects): Internal generic functions
Method, (setf page): Exported generic functions
Method, (setf page-policy): Exported generic functions
Method, (setf shaping): Exported generic functions
Method, (setf state): Exported generic functions
Method, (setf w): Exported generic functions
Method, (setf x): Exported generic functions
Method, (setf y): Exported generic functions
Method, algorithm: Exported generic functions
Method, h: Exported generic functions
Method, h: Exported generic functions
Method, height: Exported generic functions
Method, id: Exported generic functions
Method, pack-state-free-rects: Internal generic functions
Method, page: Exported generic functions
Method, page-policy: Exported generic functions
Method, rect-initargs: Exported generic functions
Method, shaping: Exported generic functions
Method, state: Exported generic functions
Method, w: Exported generic functions
Method, w: Exported generic functions
Method, width: Exported generic functions
Method, x: Exported generic functions
Method, y: Exported generic functions

N
normalize-free-space: Internal functions

P
pack: Exported functions
pack-1: Exported functions
pack-1/mr: Internal functions
pack-state-free-rects: Internal generic functions
pack-state-free-rects: Internal generic functions
page: Exported generic functions
page: Exported generic functions
page-policy: Exported generic functions
page-policy: Exported generic functions
place-rect: Internal functions
point-in-rect: Exported functions
print-rect: Internal functions

R
rect: Exported functions
rect*: Exported functions
rect-initargs: Exported generic functions
rect-initargs: Exported generic functions
rects-bounds: Exported functions
reset-pack/mr: Internal functions
resolve-free-rects: Internal functions
rl: Internal functions

S
shaping: Exported generic functions
shaping: Exported generic functions
sort-rects/area-desc: Exported functions
sort-rects/aspect*area-desc: Exported functions
sort-rects/height-desc: Exported functions
sort-rects/longest-side-desc: Exported functions
sort-rects/perimeter-desc: Exported functions
sort-rects/w+h-desc: Exported functions
sort-rects/width-desc: Exported functions
start-pack/mr: Internal functions
state: Exported generic functions
state: Exported generic functions
subdivide-rect: Internal functions

T
total-pixels: Exported functions

W
w: Exported generic functions
w: Exported generic functions
w: Exported generic functions
width: Exported generic functions
width: Exported generic functions
with-rect: Exported macros

X
x: Exported generic functions
x: Exported generic functions

Y
y: Exported generic functions
y: Exported generic functions

Jump to:   %   (  
A   C   D   F   G   H   I   M   N   P   R   S   T   W   X   Y  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   %  
A   H   P   S   W  
Index Entry  Section

%
%h: Exported classes
%id: Exported classes
%page: Exported classes
%w: Exported classes
%x: Exported classes
%y: Exported classes

A
algorithm: Exported classes

H
h: Exported conditions
height: Exported classes

P
page-policy: Exported classes

S
shaping: Exported classes
Slot, %h: Exported classes
Slot, %id: Exported classes
Slot, %page: Exported classes
Slot, %w: Exported classes
Slot, %x: Exported classes
Slot, %y: Exported classes
Slot, algorithm: Exported classes
Slot, h: Exported conditions
Slot, height: Exported classes
Slot, page-policy: Exported classes
Slot, shaping: Exported classes
Slot, state: Exported classes
Slot, w: Exported conditions
Slot, width: Exported classes
state: Exported classes

W
w: Exported conditions
width: Exported classes

Jump to:   %  
A   H   P   S   W  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   P   R   S  
Index Entry  Section

B
binpack: The binpack system
binpack: The binpack package
binpack/2: The binpack/2 package
binpack/common: The binpack/common package

C
Class, pack-state: Exported classes
Class, rect: Exported classes
Condition, packing-failed: Exported conditions

P
pack-state: Exported classes
Package, binpack: The binpack package
Package, binpack/2: The binpack/2 package
Package, binpack/common: The binpack/common package
packing-failed: Exported conditions

R
rect: Exported classes

S
System, binpack: The binpack system

Jump to:   B   C   P   R   S