craft

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

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

Box Craft

func NewBox

func NewBox(c Craft, m Margin) *Box

func (*Box) AddText

func (b *Box) AddText(str string, color color.Color) Craft

func (*Box) Const

func (b *Box) Const() *Image

func (*Box) Image

func (b *Box) Image() *ebiten.Image

func (*Box) Size

func (b *Box) Size() Size

type Craft

type Craft interface {
	Image() *ebiten.Image
	Size() Size
	AddText(string, color.Color) Craft
	Const() *Image
}

Craft

type Fill

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

Fill Craft

func NewFill

func NewFill(size Size, color color.Color) *Fill

func (*Fill) AddText

func (f *Fill) AddText(str string, color color.Color) Craft

func (*Fill) Const

func (f *Fill) Const() *Image

func (*Fill) Image

func (f *Fill) Image() *ebiten.Image

func (*Fill) Size

func (f *Fill) Size() Size

type HorizontalStack

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

HorizontalStack Craft

``` +---+---+---+ | | | | --> horizontal +---+---+---+ ```

func NewHorizontalStack

func NewHorizontalStack(crafts ...Craft) *HorizontalStack

func (*HorizontalStack) AddText

func (s *HorizontalStack) AddText(str string, color color.Color) Craft

func (*HorizontalStack) Const

func (s *HorizontalStack) Const() *Image

func (*HorizontalStack) Image

func (s *HorizontalStack) Image() *ebiten.Image

func (*HorizontalStack) Size

func (s *HorizontalStack) Size() Size

type Image

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

Image Craft

func NewImage

func NewImage(img image.Image) *Image

func (*Image) AddText

func (i *Image) AddText(str string, color color.Color) Craft

func (*Image) Const

func (i *Image) Const() *Image

func (*Image) Image

func (i *Image) Image() *ebiten.Image

func (*Image) Size

func (i *Image) Size() Size

type Layer

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

Layer Craft

``` +------+ | | | |---+ +------+ | ....| | ....+------+ --> layer ```

func NewLayer

func NewLayer(crafts ...Craft) *Layer

func (*Layer) AddText

func (l *Layer) AddText(str string, color color.Color) Craft

func (*Layer) Const

func (l *Layer) Const() *Image

func (*Layer) Image

func (l *Layer) Image() *ebiten.Image

func (*Layer) Size

func (l *Layer) Size() Size

type Margin

type Margin struct {
	Left, Top, Right, Bottom int
}

func MarginAll added in v0.2.1

func MarginAll(v int) Margin

type Size added in v0.2.1

type Size image.Point

type VerticalStack

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

VerticalStack Craft

``` +---+ | | +---+ | | +---+ ..| vertical ..v

```

func NewVerticalStack

func NewVerticalStack(crafts ...Craft) *VerticalStack

func (*VerticalStack) AddText

func (s *VerticalStack) AddText(str string, color color.Color) Craft

func (*VerticalStack) Const

func (s *VerticalStack) Const() *Image

func (*VerticalStack) Image

func (s *VerticalStack) Image() *ebiten.Image

func (*VerticalStack) Size

func (s *VerticalStack) Size() Size

Jump to

Keyboard shortcuts

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