ebiten/graphics/graphics.go
2013-06-19 08:49:54 +09:00

30 lines
526 B
Go

package graphics
import (
"image"
"image/color"
)
type Device interface {
Update()
// TODO: Move somewhere
NewTexture(width, height int) Texture
NewTextureFromImage(img image.Image) Texture
}
type GraphicsContext interface {
Clear()
Fill(color color.Color)
DrawTexture(texture Texture,
srcX, srcY, srcWidth, srcHeight int,
geometryMatrix *GeometryMatrix, colorMatrix *ColorMatrix)
SetOffscreen(texture Texture)
}
type Texture interface {
Width() int
Height() int
TextureWidth() int
TextureHeight() int
}