canvas

package module
v0.0.0-...-5ea4400 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2013 License: BSD-2-Clause Imports: 10 Imported by: 0

README

wde.canvas

HTML5 Canvas backend for go.wde

Usage

When using go.wde, just import:

_ "github.com/errnoh/wde.canvas"

And then connect to localhost:12500 with your browser.

Note:

  • Remember not to import multiple backends. (e.g. go.wde/init)
  • Some functions (Resize for example) are not yet implemented.
  • Browser needs websocket and canvas support.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWindow

func NewWindow(width, height int) (w wde.Window, err error)

Types

type RGBA

type RGBA struct {
	*image.RGBA
}

func (RGBA) AsRGBA

func (img RGBA) AsRGBA() *image.RGBA

func (RGBA) CopyRGBA

func (img RGBA) CopyRGBA(src *image.RGBA, bounds image.Rectangle)

type Window

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

func (*Window) Close

func (w *Window) Close() (err error)

func (*Window) EventChan

func (w *Window) EventChan() (events <-chan interface{})

func (*Window) FPS

func (w *Window) FPS() <-chan int

func (*Window) FlushImage

func (w *Window) FlushImage(bounds ...image.Rectangle)

func (*Window) LockSize

func (w *Window) LockSize(lock bool)

func (*Window) Screen

func (w *Window) Screen() (im wde.Image)

func (*Window) SetIcon

func (w *Window) SetIcon(icon image.Image)

NOTE: Not yet supported

func (*Window) SetIconName

func (w *Window) SetIconName(name string)

NOTE: Not yet supported

func (*Window) SetSize

func (w *Window) SetSize(width, height int)

func (*Window) SetTitle

func (w *Window) SetTitle(title string)

func (*Window) Show

func (w *Window) Show()

NOTE: Doesn't do anything yet.

func (*Window) Size

func (w *Window) Size() (width, height int)

Returns width and height of the canvas.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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