gldraw

package
v0.0.0-...-226917b Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 10 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)

func (*Context) SetSize

func (c *Context) SetSize(s float64)

type FontLookup

type FontLookup interface {
	draw.FontLookup
	LoadFont(draw.Font, float64) font.Face
	SetSize(s float64)
}

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) Delete

func (t *Texture) Delete()

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