spacepartition

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alignment

type Alignment int
const (
	NotAligned Alignment = iota
	Vertical
	Horizontal
)

type ShapeArray

type ShapeArray []shared.Shape

func (ShapeArray) Remove

func (a ShapeArray) Remove(shape shared.Shape) ([]shared.Shape, int)

type Split

type Split struct {
	Position  int
	BecauseOf []shared.Shape
	Alignment Alignment
}

type SplitArray

type SplitArray []*Split

func (SplitArray) Remove

func (sa SplitArray) Remove(shape shared.Shape) ([]*Split, []*Split)

type SplitCoordination

type SplitCoordination struct {
	HSplit *Split
	VSplit *Split
}

func SC

func SC(HSplit *Split, VSplit *Split) SplitCoordination

func (SplitCoordination) Sane

func (c SplitCoordination) Sane() bool

type Struct

type Struct struct {
	VSplits []*Split
	HSplits []*Split
	Stacks  map[SplitCoordination][]*shared.Point
}

func New

func New() *Struct

func (*Struct) Add

func (m *Struct) Add(shape shared.Shape, zIndex int)

func (*Struct) AddAll

func (m *Struct) AddAll(shapes ...shared.Shape) *Struct

func (*Struct) GetAt

func (m *Struct) GetAt(x int, y int) shared.Shape

func (*Struct) GetStackAt

func (m *Struct) GetStackAt(x int, y int) []shared.Shape

func (*Struct) GetXYPositions

func (m *Struct) GetXYPositions(p image.Point) (int, int)

func (*Struct) Remove

func (m *Struct) Remove(shape shared.Shape)

Jump to

Keyboard shortcuts

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