grid

package
v0.0.0-...-59843aa Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 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 Grid

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

网格

func NewGrid

func NewGrid(engine *g2d.Engine, width, height int) (grid Grid)

新建

func (*Grid) Draw

func (g *Grid) Draw()

渲染

func (*Grid) GetColor

func (g *Grid) GetColor() string

获取颜色

func (*Grid) GetCount

func (g *Grid) GetCount() (x, y int)

取数量

func (*Grid) GetGrid

func (g *Grid) GetGrid(x, y int) (xoff, yoff int)

计算格子

func (*Grid) GetOffset

func (g *Grid) GetOffset() (x, y int)

获取偏移

func (*Grid) GetPosition

func (g *Grid) GetPosition(xoff, yoff int) (x, y int)

计算位置

func (*Grid) GetSize

func (g *Grid) GetSize() (width, height int)

取大小

func (*Grid) SetColor

func (g *Grid) SetColor(color string)

设置颜色

func (*Grid) SetOffset

func (g *Grid) SetOffset(x, y int)

设置偏移

Jump to

Keyboard shortcuts

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