Documentation ¶
Overview ¶
maxrect implements MaxRects packing algorithm
Index ¶
- func CommonInterval(a0, a1, b0, b1 int) int
- func FindBest(frees []image.Rectangle, size image.Point, rotate bool, score ScoreFn) (image.Rectangle, int, int)
- func FitsInto(free image.Rectangle, size image.Point) bool
- type Context
- func (context *Context) Add(size image.Point) (r image.Rectangle, ok bool)
- func (context *Context) Adds(size ...image.Point) (r []image.Rectangle, ok bool)
- func (context *Context) Area(size image.Point) (image.Rectangle, int, int)
- func (context *Context) BottomLeft(size image.Point) (image.Rectangle, int, int)
- func (context *Context) ContactPoint(size image.Point) (image.Rectangle, int, int)
- func (context *Context) LongSide(size image.Point) (image.Rectangle, int, int)
- func (context *Context) PlaceRect(rect image.Rectangle)
- func (context *Context) SetRule(rule Rule)
- func (context *Context) ShortSide(size image.Point) (image.Rectangle, int, int)
- type Rule
- type ScoreFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommonInterval ¶
Types ¶
type Context ¶
type Context struct { Size image.Point Rotate bool Score func(size image.Point) (image.Rectangle, int, int) Used []image.Rectangle Free []image.Rectangle DebugPlace func(r image.Rectangle) }
func (*Context) BottomLeft ¶
func (*Context) ContactPoint ¶
Click to show internal directories.
Click to hide internal directories.