packing

package
v2.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package packing offers a packing algorithm in 2D space.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

func (*Node) Region

func (n *Node) Region() (x, y, width, height int)

type Page

type Page struct {
	// contains filtered or unexported fields
}

func NewPage

func NewPage(initWidth, initHeight int, maxSize int) *Page

func (*Page) Alloc

func (p *Page) Alloc(width, height int) *Node

func (*Page) Free

func (p *Page) Free(node *Node)

func (*Page) IsEmpty

func (p *Page) IsEmpty() bool

func (*Page) Size

func (p *Page) Size() (int, int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL