shared

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 2 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 Name

type Name string

type Op

type Op any

type Point

type Point struct {
	ZIndex int
	Shape
}

type PointArray

type PointArray []*Point

func (PointArray) Insert

func (pa PointArray) Insert(point *Point) []*Point

func (PointArray) Remove

func (pa PointArray) Remove(shape Shape) ([]*Point, int)

type Rectangle

type Rectangle struct {
	image.Rectangle
	Name string
}

func NewRectangle

func NewRectangle(left, top, right, bottom int, ops ...Op) *Rectangle

func (Rectangle) Bounds

func (r Rectangle) Bounds() image.Rectangle

func (Rectangle) PointIn

func (r Rectangle) PointIn(x, y int) bool

func (Rectangle) String

func (r Rectangle) String() string

type Shape

type Shape interface {
	PointIn(x, y int) bool
	Bounds() image.Rectangle
	String() string
}

type ZSort

type ZSort []*Point

func (ZSort) Len

func (Z ZSort) Len() int

func (ZSort) Less

func (Z ZSort) Less(i, j int) bool

func (ZSort) Swap

func (Z ZSort) Swap(i, j int)

Jump to

Keyboard shortcuts

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