gldraw

package
v0.0.0-...-09fa35e Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

func (*Context) DebugShowFontTextures

func (c *Context) DebugShowFontTextures(s float32)

func (*Context) Draw

func (c *Context) Draw(w, h int, cmd []draw.CommandList)

func (*Context) FontLookup

func (c *Context) FontLookup() draw.FontLookup

func (*Context) Init

func (c *Context) Init(f FontLookup)

func (*Context) SetIconLookup

func (c *Context) SetIconLookup(l IconLookup)

type FontLookup

type FontLookup interface {
	draw.FontLookup
	LoadFont(draw.Font) font.Face
}

type IconLookup

type IconLookup interface {
	// IconSize should return the next smaller supported icon size.
	IconSize(int) int
	// DrawIcon draws an icon. The size of the image can be assumed to be a value returned by IconSize.
	DrawIcon(*image.Alpha, string)
}

type Texture

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

func NewTexture

func NewTexture(img *image.RGBA) *Texture

func NewTextureAlpha

func NewTextureAlpha(img *image.Alpha) *Texture

func NewTextureAlphaEmpty

func NewTextureAlphaEmpty(w, h int) *Texture

func NewTextureEmpty

func NewTextureEmpty(w, h int) *Texture

func TextureFromFile

func TextureFromFile(filename string) (*Texture, error)

func TextureFromReader

func TextureFromReader(r io.Reader) (*Texture, error)

func (*Texture) Bounds

func (t *Texture) Bounds() image.Rectangle

func (*Texture) Update

func (t *Texture) Update(img *image.RGBA, p image.Point)

func (*Texture) UpdateAlpha

func (t *Texture) UpdateAlpha(img *image.Alpha, p image.Point)

Jump to

Keyboard shortcuts

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