grid

package
v0.0.0-...-482d934 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grid

type Grid struct {
	Tiles    []*ImageTile
	RowNb    int
	ColumnNb int
}

Grid List of ImageTile

func New

func New(imageFilePaths []string, row int, column int) *Grid

New Create new Grid

func (*Grid) ExecOnTileFlipCombination

func (g *Grid) ExecOnTileFlipCombination(f func(*Grid))

ExecOnTileFlipCombination Execute f function on each flip combination of tiles

func (*Grid) ExecOnTilePermutation

func (g *Grid) ExecOnTilePermutation(f func(*Grid))

ExecOnTilePermutation Execute f function on each permutation of tiles

func (*Grid) Merge

func (g *Grid) Merge() (*image.NRGBA, error)

Merge bnlabla

type ImageTile

type ImageTile struct {
	ImageFilePath string
	Image         image.Image
	Portrait      bool
	Flipped       bool
}

ImageTile Image Grid component

func (*ImageTile) ReadFile

func (it *ImageTile) ReadFile() error

ReadFile Get Image from file

func (*ImageTile) Upturn

func (it *ImageTile) Upturn()

Upturn Rotate image to 180°

Jump to

Keyboard shortcuts

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