Documentation
¶
Index ¶
- Constants
- func DrawRect(x1, y1, x2, y2, thickness int, col color.Color, img *image.NRGBA)
- func STBRPInitTarget(context *STBRPContext, width, height int, nodes []*STBRPNode)
- func STBRPPackRects(context *STBRPContext, rects []*STBRPRect) int
- type Collage
- type Layout
- type Position
- type Rect
- type STBRPContext
- type STBRPCoord
- type STBRPNode
- type STBRPRect
- type SemibranCollage
- func (sc *SemibranCollage) AddImageFile(path string) error
- func (sc *SemibranCollage) AddRect(name string, width, height int64) error
- func (sc *SemibranCollage) CreateImage(layout Layout, dirName string) (image.Image, error)
- func (sc *SemibranCollage) CreateJSON(layout Layout) ([]byte, error)
- func (sc *SemibranCollage) CreateLayout(layout Layout) (*PictureFS.Layout, error)
- func (sc *SemibranCollage) Pack() (Layout, error)
- type Size
Constants ¶
View Source
const ( STBRP_HEURISTIC_Skyline_default = 0 STBRP_HEURISTIC_Skyline_BL_sortHeight = 0 STBRP_HEURISTIC_Skyline_BF_sortHeight = 1 )
View Source
const SIDE_LENGTH_WEIGHT = 20
View Source
const STBRP__INIT_skyline = 1
View Source
const STBRP__MAXVAL = 0x7fffffff
View Source
const WHITESPACE_WEIGHT = 1
weights: greater side length produces more square-like output
Variables ¶
This section is empty.
Functions ¶
func STBRPInitTarget ¶
func STBRPInitTarget(context *STBRPContext, width, height int, nodes []*STBRPNode)
func STBRPPackRects ¶
func STBRPPackRects(context *STBRPContext, rects []*STBRPRect) int
Types ¶
type STBRPContext ¶
type STBRPContext struct {
// contains filtered or unexported fields
}
type STBRPCoord ¶
type STBRPCoord int
type STBRPRect ¶
type STBRPRect struct { // contains filtered or unexported fields } // 16 bytes, nominally
func NewSTBRPRect ¶
func (*STBRPRect) SetDimensions ¶
type SemibranCollage ¶
type SemibranCollage struct {
// contains filtered or unexported fields
}
func NewSemibranCollage ¶
func NewSemibranCollage( basePath string, borderWidth, margin int64, marginLeft, marginTop, marginRight, marginBottom int64, ) *SemibranCollage
func (*SemibranCollage) AddImageFile ¶
func (sc *SemibranCollage) AddImageFile(path string) error
func (*SemibranCollage) AddRect ¶
func (sc *SemibranCollage) AddRect(name string, width, height int64) error
func (*SemibranCollage) CreateImage ¶
func (*SemibranCollage) CreateJSON ¶
func (sc *SemibranCollage) CreateJSON(layout Layout) ([]byte, error)
func (*SemibranCollage) CreateLayout ¶
func (sc *SemibranCollage) CreateLayout(layout Layout) (*PictureFS.Layout, error)
func (*SemibranCollage) Pack ¶
func (sc *SemibranCollage) Pack() (Layout, error)
Click to show internal directories.
Click to hide internal directories.