canvas

package
v0.0.0-...-ff9b8a1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedCanvas

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

BufferedCanvas is Canvas with buffer

func NewBufferedCanvas

func NewBufferedCanvas(id string) BufferedCanvas

NewBufferedCanvas creates new BufferedCanvas

func (BufferedCanvas) At

func (b BufferedCanvas) At(x, y int) color.Color

At is part of Image interface

func (BufferedCanvas) Bounds

func (b BufferedCanvas) Bounds() image.Rectangle

Bounds is part of Image interface

func (BufferedCanvas) ColorModel

func (b BufferedCanvas) ColorModel() color.Model

ColorModel is part of Image interface

func (BufferedCanvas) FillTestRect

func (b BufferedCanvas) FillTestRect()

FillTestRect is test pattern

func (BufferedCanvas) Set

func (b BufferedCanvas) Set(x, y int, color color.Color)

Set is part of image/draw Image interface

func (BufferedCanvas) SetSize

func (b BufferedCanvas) SetSize(width, height int)

SetSize sets size

func (BufferedCanvas) Update

func (b BufferedCanvas) Update()

Update syncs real canvas and buffer

type Canvas

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

Canvas is js canvas

func GetCanvas

func GetCanvas(id string) Canvas

GetCanvas gets canvas

func (Canvas) At

func (c Canvas) At(x, y int) color.Color

At is part of Image interface

func (Canvas) Bounds

func (c Canvas) Bounds() image.Rectangle

Bounds is part of Image interface

func (Canvas) ColorModel

func (c Canvas) ColorModel() color.Model

ColorModel is part of Image interface

func (*Canvas) FillTestRect

func (c *Canvas) FillTestRect()

FillTestRect is test pattern

func (Canvas) Set

func (c Canvas) Set(x, y int, color color.Color)

Set is part of image/draw Image interface

func (*Canvas) SetSize

func (c *Canvas) SetSize(width, height int)

SetSize sets size

Jump to

Keyboard shortcuts

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