Documentation ¶
Index ¶
- Constants
- func BeginFrame() error
- func DumpImages(dir string) error
- func EndFrame() error
- func MakeImagesSharedForTesting()
- func SetGraphicsDriver(graphics driver.Graphics)
- type Image
- func (i *Image) At(x, y int) (byte, byte, byte, byte)
- func (i *Image) ClearFramebuffer()
- func (i *Image) Dispose()
- func (i *Image) DrawTriangles(img *Image, vertices []float32, indices []uint16, colorm *affine.ColorM, ...)
- func (i *Image) Dump(path string) error
- func (i *Image) Fill(clr color.Color)
- func (i *Image) IsSharedForTesting() bool
- func (i *Image) IsVolatile() bool
- func (i *Image) MakeVolatile()
- func (i *Image) PutVertex(dst []float32, dx, dy, sx, sy float32, bx0, by0, bx1, by1 float32, ...)
- func (i *Image) ReplacePixels(p []byte)
- func (i *Image) Size() (width, height int)
Constants ¶
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 MakeImagesSharedForTesting ¶
func MakeImagesSharedForTesting()
func SetGraphicsDriver ¶ added in v1.10.0
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
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) DrawTriangles ¶ added in v1.10.0
func (*Image) IsSharedForTesting ¶ added in v1.8.0
func (*Image) IsVolatile ¶ added in v1.8.0
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 ¶
Click to show internal directories.
Click to hide internal directories.