pixels

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pixels

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

Pixels represents pixels of an image for restoring when GL context is lost.

func (*Pixels) AppendDrawImageHistory

func (p *Pixels) AppendDrawImageHistory(image *graphics.Image, vertices []int16, geom graphics.Matrix, colorm graphics.Matrix, mode opengl.CompositeMode)

func (*Pixels) At

func (p *Pixels) At(idx int, image *graphics.Image, context *opengl.Context) (color.RGBA, error)

At returns a color value at idx.

Note that this must not be called until context is available. This means Pixels members must match with acutal state in VRAM.

func (*Pixels) Clear

func (p *Pixels) Clear()

func (*Pixels) CreateImage

func (p *Pixels) CreateImage(context *opengl.Context, width, height int, filter opengl.Filter) (*graphics.Image, error)

CreateImage restores *graphics.Image from the pixels using its state.

func (*Pixels) DependsOn

func (p *Pixels) DependsOn(target *graphics.Image) bool

func (*Pixels) Fill

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

func (*Pixels) HasDependency

func (p *Pixels) HasDependency() bool

func (*Pixels) IsStale

func (p *Pixels) IsStale() bool

func (*Pixels) MakeStale

func (p *Pixels) MakeStale()

func (*Pixels) ReadPixelsFromVRAMIfStale

func (p *Pixels) ReadPixelsFromVRAMIfStale(image *graphics.Image, context *opengl.Context) error

func (*Pixels) ReplacePixels

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

Jump to

Keyboard shortcuts

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