Versions in this module Expand all Collapse all v0 v0.1.2 Nov 28, 2018 v0.1.1 Jan 7, 2018 Changes in this version + 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 struct + DebugPlace func(r image.Rectangle) + Free []image.Rectangle + Rotate bool + Score func(size image.Point) (image.Rectangle, int, int) + Size image.Point + Used []image.Rectangle + func New(size image.Point) *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 byte + const Area + const Automatic + const BottomLeft + const ContactPoint + const LongSide + const ShortSide + func ParseRule(s string) Rule + type ScoreFn func(free image.Rectangle, size image.Point) (int, int)