ebiten: github.com/hajimehoshi/ebiten/internal/shareable Index | Files

package shareable

import "github.com/hajimehoshi/ebiten/internal/shareable"


Package Files



const MaxCountForShare = 10

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

This value is expoted for testing.

func Error Uses

func Error() error

func Images Uses

func Images() []image.Image

func InitializeGraphicsDriverState Uses

func InitializeGraphicsDriverState() error

func MakeImagesSharedForTesting Uses

func MakeImagesSharedForTesting()

func ResolveStaleImages Uses

func ResolveStaleImages()

func RestoreIfNeeded Uses

func RestoreIfNeeded() error

type Image Uses

type Image struct {
    // contains filtered or unexported fields

func NewImage Uses

func NewImage(width, height int) *Image

func NewScreenFramebufferImage Uses

func NewScreenFramebufferImage(width, height int) *Image

func (*Image) At Uses

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

func (*Image) Dispose Uses

func (i *Image) Dispose()

func (*Image) DrawTriangles Uses

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

func (*Image) Fill Uses

func (i *Image) Fill(r, g, b, a uint8)

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

func (*Image) IsSharedForTesting Uses

func (i *Image) IsSharedForTesting() bool

func (*Image) IsVolatile Uses

func (i *Image) IsVolatile() bool

func (*Image) MakeVolatile Uses

func (i *Image) MakeVolatile()

func (*Image) PutVertex Uses

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

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

func (*Image) QuadVertices Uses

func (i *Image) QuadVertices(sx0, sy0, sx1, sy1 int, a, b, c, d, tx, ty float32, cr, cg, cb, ca float32) []float32

QuadVertices returns the vertices for rendering a quad.

QuadVertices is highly optimized for rendering quads, and that's the most significant difference from PutVertices.

func (*Image) ReplacePixels Uses

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

func (*Image) Size Uses

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

Package shareable imports 9 packages (graph) and is imported by 2 packages. Updated 2019-06-19. Refresh now. Tools for package owners.