restorable

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearVolatileImages

func ClearVolatileImages()

func ResolveStalePixels

func ResolveStalePixels() error

func Restore

func Restore() error

Types

type Image

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

Image represents an image that can be restored when GL context is lost.

func NewImage

func NewImage(width, height int, filter opengl.Filter, volatile bool) *Image

func NewImageFromImage

func NewImageFromImage(source *image.RGBA, width, height int, filter opengl.Filter) *Image

func NewScreenFramebufferImage

func NewScreenFramebufferImage(width, height int) *Image

func (*Image) At

func (p *Image) At(x, y int) (color.RGBA, error)

At returns a color value at (x, y).

Note that this must not be called until context is available.

func (*Image) BasePixelsForTesting

func (p *Image) BasePixelsForTesting() []uint8

func (*Image) Dispose

func (p *Image) Dispose()

func (*Image) DrawImage

func (p *Image) DrawImage(img *Image, vertices []float32, colorm *affine.ColorM, mode opengl.CompositeMode)

func (*Image) Fill

func (p *Image) Fill(clr color.RGBA)

func (*Image) IsInvalidated

func (p *Image) IsInvalidated() bool

func (*Image) ReplacePixels

func (p *Image) ReplacePixels(pixels []uint8)

func (*Image) Size

func (p *Image) Size() (int, int)

Jump to

Keyboard shortcuts

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