The binpack Reference Manual

This is the binpack Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 03:27:08 2024 GMT+0.

Table of Contents


1 Systems

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


1.1 binpack

Rectangle packer for sprite/texture atlases

Author

Bart Botta

License

MIT

Version

0.0.1

Dependency

alexandria (system).

Source

binpack.asd.

Child Components

2 Files

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


2.1 Lisp


2.1.1 binpack/binpack.asd

Source

binpack.asd.

Parent Component

binpack (system).

ASDF Systems

binpack.


2.1.2 binpack/packages.lisp

Source

binpack.asd.

Parent Component

binpack (system).

Packages

2.1.3 binpack/common.lisp

Dependency

packages.lisp (file).

Source

binpack.asd.

Parent Component

binpack (system).

Public Interface
Internals

2.1.4 binpack/maxrects.lisp

Dependency

common.lisp (file).

Source

binpack.asd.

Parent Component

binpack (system).

Internals

2.1.5 binpack/binpack.lisp

Dependency

maxrects.lisp (file).

Source

binpack.asd.

Parent Component

binpack (system).

Public Interface
Internals

%auto-pack (function).


3 Packages

Packages are listed by definition order.


3.1 binpack/2

Source

packages.lisp.

Use List

3.2 binpack

Source

packages.lisp.

Use List
Public Interface
Internals

3.3 binpack/common

Source

packages.lisp.

Use List

common-lisp.

Used By List
Public Interface
Internals

4 Definitions

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


4.1 Public Interface


4.1.1 Macros

Macro: with-rect ((id x y w h) rect &body body)
Package

binpack/common.

Source

common.lisp.


4.1.2 Ordinary 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.

Function: containsp (outer inner)
Package

binpack/common.

Source

common.lisp.

Function: intersectsp (rect1 rect2)
Package

binpack/common.

Source

common.lisp.

Function: pack (rects width height)
Package

binpack.

Source

binpack.lisp.

Function: pack-1 (rect state)
Package

binpack.

Source

binpack.lisp.

Function: point-in-rect (rect px py)
Package

binpack/common.

Source

common.lisp.

Function: rect (id x y w h)
Package

binpack/common.

Source

common.lisp.

Function: rect* (w h &optional id)
Package

binpack/common.

Source

common.lisp.

Function: rects-bounds (rects)
Package

binpack/common.

Source

common.lisp.

Function: sort-rects/area-desc (rects)
Package

binpack/common.

Source

common.lisp.

Function: sort-rects/aspect*area-desc (rects)
Package

binpack/common.

Source

common.lisp.

Function: sort-rects/height-desc (rects)
Package

binpack/common.

Source

common.lisp.

Function: sort-rects/longest-side-desc (rects)
Package

binpack/common.

Source

common.lisp.

Function: sort-rects/perimeter-desc (rects)
Package

binpack/common.

Source

common.lisp.

Function: sort-rects/w+h-desc (rects)
Package

binpack/common.

Source

common.lisp.

Function: sort-rects/width-desc (rects)
Package

binpack/common.

Source

common.lisp.

Function: total-pixels (rects)
Package

binpack/common.

Source

common.lisp.


4.1.3 Generic functions

Generic Reader: algorithm (object)
Package

binpack/common.

Methods
Reader Method: algorithm ((pack-state pack-state))

automatically generated reader method

Source

common.lisp.

Target Slot

algorithm.

Generic Reader: h (object)
Package

binpack/common.

Methods
Reader Method: h ((condition packing-failed))
Source

common.lisp.

Target Slot

h.

Reader Method: h ((rect rect))

automatically generated reader method

Source

common.lisp.

Target Slot

%h.

Generic Writer: (setf h) (object)
Package

binpack/common.

Methods
Writer Method: (setf h) ((rect rect))

automatically generated writer method

Source

common.lisp.

Target Slot

%h.

Generic Reader: height (object)
Package

binpack/common.

Methods
Reader Method: height ((pack-state pack-state))

automatically generated reader method

Source

common.lisp.

Target Slot

height.

Generic Reader: id (object)
Package

binpack/common.

Methods
Reader Method: id ((rect rect))

automatically generated reader method

Source

common.lisp.

Target Slot

%id.

Generic Reader: page (object)
Package

binpack/common.

Methods
Reader Method: page ((rect rect))

automatically generated reader method

Source

common.lisp.

Target Slot

%page.

Generic Writer: (setf page) (object)
Package

binpack/common.

Methods
Writer Method: (setf page) ((rect rect))

automatically generated writer method

Source

common.lisp.

Target Slot

%page.

Generic Reader: page-policy (object)
Package

binpack/common.

Methods
Reader Method: page-policy ((pack-state pack-state))

automatically generated reader method

Source

common.lisp.

Target Slot

page-policy.

Generic Writer: (setf page-policy) (object)
Package

binpack/common.

Methods
Writer Method: (setf page-policy) ((pack-state pack-state))

automatically generated writer method

Source

common.lisp.

Target Slot

page-policy.

Generic Function: rect-initargs (rect)
Package

binpack/common.

Source

common.lisp.

Method Combination

append.

Options

:most-specific-first

Methods
Method: rect-initargs append ((r rect))
Generic Reader: shaping (object)
Package

binpack/common.

Methods
Reader Method: shaping ((pack-state pack-state))

automatically generated reader method

Source

common.lisp.

Target Slot

shaping.

Generic Writer: (setf shaping) (object)
Package

binpack/common.

Methods
Writer Method: (setf shaping) ((pack-state pack-state))

automatically generated writer method

Source

common.lisp.

Target Slot

shaping.

Generic Reader: state (object)
Package

binpack/common.

Methods
Reader Method: state ((pack-state pack-state))

automatically generated reader method

Source

common.lisp.

Target Slot

state.

Generic Writer: (setf state) (object)
Package

binpack/common.

Methods
Writer Method: (setf state) ((pack-state pack-state))

automatically generated writer method

Source

common.lisp.

Target Slot

state.

Generic Reader: w (object)
Package

binpack/common.

Methods
Reader Method: w ((condition packing-failed))
Source

common.lisp.

Target Slot

w.

Reader Method: w ((rect rect))

automatically generated reader method

Source

common.lisp.

Target Slot

%w.

Generic Writer: (setf w) (object)
Package

binpack/common.

Methods
Writer Method: (setf w) ((rect rect))

automatically generated writer method

Source

common.lisp.

Target Slot

%w.

Generic Reader: width (object)
Package

binpack/common.

Methods
Reader Method: width ((pack-state pack-state))

automatically generated reader method

Source

common.lisp.

Target Slot

width.

Generic Reader: x (object)
Package

binpack/common.

Methods
Reader Method: x ((rect rect))

automatically generated reader method

Source

common.lisp.

Target Slot

%x.

Generic Writer: (setf x) (object)
Package

binpack/common.

Methods
Writer Method: (setf x) ((rect rect))

automatically generated writer method

Source

common.lisp.

Target Slot

%x.

Generic Reader: y (object)
Package

binpack/common.

Methods
Reader Method: y ((rect rect))

automatically generated reader method

Source

common.lisp.

Target Slot

%y.

Generic Writer: (setf y) (object)
Package

binpack/common.

Methods
Writer Method: (setf y) ((rect rect))

automatically generated writer method

Source

common.lisp.

Target Slot

%y.


4.1.4 Conditions

Condition: packing-failed
Package

binpack/common.

Source

common.lisp.

Direct superclasses

simple-error.

Direct methods
Direct slots
Slot: w
Initargs

:w

Readers

w.

Writers

This slot is read-only.

Slot: h
Initargs

:h

Readers

h.

Writers

This slot is read-only.


4.1.5 Classes

Class: pack-state
Package

binpack/common.

Source

common.lisp.

Direct methods
Direct slots
Slot: state
Initargs

:state

Readers

state.

Writers

(setf state).

Slot: algorithm
Initargs

:algorithm

Readers

algorithm.

Writers

This slot is read-only.

Slot: width
Initargs

:width

Readers

width.

Writers

This slot is read-only.

Slot: height
Initargs

:height

Readers

height.

Writers

This slot is read-only.

Slot: shaping
Initargs

:shaping

Readers

shaping.

Writers

(setf shaping).

Slot: page-policy
Initargs

:page-policy

Readers

page-policy.

Writers

(setf page-policy).

Class: rect
Package

binpack/common.

Source

common.lisp.

Direct methods
Direct slots
Slot: %id
Initargs

:id

Readers

id.

Writers

This slot is read-only.

Slot: %w
Initargs

:w

Readers

w.

Writers

(setf w).

Slot: %h
Initargs

:h

Readers

h.

Writers

(setf h).

Slot: %x
Initargs

:x

Readers

x.

Writers

(setf x).

Slot: %y
Initargs

:y

Readers

y.

Writers

(setf y).

Slot: %page
Readers

page.

Writers

(setf page).


4.2 Internals


4.2.1 Ordinary functions

Function: %auto-pack (rects &key width height auto-size-granularity-x auto-size-granularity-y expand-mode)
Package

binpack.

Source

binpack.lisp.

Function: contains (r1 r2)
Package

binpack/common.

Source

common.lisp.

Function: delta-weight (width height rect)
Package

binpack.

Source

maxrects.lisp.

Function: find-free-rect (width height rects)
Package

binpack.

Source

maxrects.lisp.

Function: grow-rects (rects dx dy)
Package

binpack.

Source

maxrects.lisp.

Function: intersects (r1 r2)
Package

binpack/common.

Source

common.lisp.

Function: normalize-free-space (rects)
Package

binpack.

Source

maxrects.lisp.

Function: pack-1/mr (rect state)
Package

binpack.

Source

maxrects.lisp.

Function: place-rect (rect free-rects)
Package

binpack.

Source

maxrects.lisp.

Function: print-rect (r &optional stream)
Package

binpack/common.

Source

common.lisp.

Function: reset-pack/mr (state width height)
Package

binpack.

Source

maxrects.lisp.

Function: resolve-free-rects (rect free-rects)
Package

binpack.

Source

maxrects.lisp.

Function: rl (rect)
Package

binpack.

Source

maxrects.lisp.

Function: start-pack/mr (width height)
Package

binpack.

Source

maxrects.lisp.

Function: subdivide-rect (rect placed)
Package

binpack.

Source

maxrects.lisp.

Function: touches (r1 r2)
Package

binpack/common.

Source

common.lisp.


4.2.2 Generic functions

Generic Function: pack-state-free-rects (ps)
Package

binpack.

Methods
Method: pack-state-free-rects ((ps pack-state))
Source

maxrects.lisp.

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

binpack.

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

maxrects.lisp.


Appendix A Indexes


A.1 Concepts


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: Private ordinary functions

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

A
algorithm: Public generic functions
algorithm: Public generic functions
auto-pack: Public ordinary functions

C
contains: Private ordinary functions
containsp: Public ordinary functions

D
delta-weight: Private ordinary functions

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

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

H
h: Public generic functions
h: Public generic functions
h: Public generic functions
height: Public generic functions
height: Public generic functions

I
id: Public generic functions
id: Public generic functions
intersects: Private ordinary functions
intersectsp: Public ordinary functions

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

N
normalize-free-space: Private ordinary functions

P
pack: Public ordinary functions
pack-1: Public ordinary functions
pack-1/mr: Private ordinary functions
pack-state-free-rects: Private generic functions
pack-state-free-rects: Private generic functions
page: Public generic functions
page: Public generic functions
page-policy: Public generic functions
page-policy: Public generic functions
place-rect: Private ordinary functions
point-in-rect: Public ordinary functions
print-rect: Private ordinary functions

R
rect: Public ordinary functions
rect*: Public ordinary functions
rect-initargs: Public generic functions
rect-initargs: Public generic functions
rects-bounds: Public ordinary functions
reset-pack/mr: Private ordinary functions
resolve-free-rects: Private ordinary functions
rl: Private ordinary functions

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

T
total-pixels: Public ordinary functions
touches: Private ordinary functions

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

X
x: Public generic functions
x: Public generic functions

Y
y: Public generic functions
y: Public generic functions