shareable

package
v1.10.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MaxCountForShare = 10

MaxCountForShare represents the time duration when the image can become shared.

This value is exported for testing.

Variables

This section is empty.

Functions

func BeginFrame added in v1.10.0

func BeginFrame() error

func DumpImages added in v1.10.0

func DumpImages(dir string) error

func EndFrame added in v1.10.0

func EndFrame() error

func MakeImagesSharedForTesting

func MakeImagesSharedForTesting()

func SetGraphicsDriver added in v1.10.0

func SetGraphicsDriver(graphics driver.Graphics)

Types

type Image

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

func NewImage

func NewImage(width, height int) *Image

func NewScreenFramebufferImage

func NewScreenFramebufferImage(width, height int) *Image

func (*Image) At

func (i *Image) At(x, y int) (byte, byte, byte, byte)

func (*Image) ClearFramebuffer added in v1.10.0

func (i *Image) ClearFramebuffer()

ClearFramebuffer clears the image with a color. This affects not only the (0, 0)-(width, height) region but also the whole framebuffer region.

func (*Image) Dispose

func (i *Image) Dispose()

func (*Image) DrawTriangles added in v1.10.0

func (i *Image) DrawTriangles(img *Image, vertices []float32, indices []uint16, colorm *affine.ColorM, mode driver.CompositeMode, filter driver.Filter, address driver.Address)

func (*Image) Dump added in v1.10.0

func (i *Image) Dump(path string) error

func (*Image) Fill added in v1.9.0

func (i *Image) Fill(clr color.Color)

func (*Image) IsSharedForTesting added in v1.8.0

func (i *Image) IsSharedForTesting() bool

func (*Image) IsVolatile added in v1.8.0

func (i *Image) IsVolatile() bool

func (*Image) MakeVolatile added in v1.9.0

func (i *Image) MakeVolatile()

func (*Image) PutVertex added in v1.9.0

func (i *Image) PutVertex(dst []float32, dx, dy, sx, sy float32, bx0, by0, bx1, by1 float32, cr, cg, cb, ca float32)

PutVertices puts the given dst with vertices that can be passed to DrawTriangles.

func (*Image) ReplacePixels

func (i *Image) ReplacePixels(p []byte)

func (*Image) Size

func (i *Image) Size() (width, height int)

Jump to

Keyboard shortcuts

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