ebiten/graphics/texture_factory.go

37 lines
757 B
Go
Raw Normal View History

package graphics
import (
"image"
)
type TextureCreatedEvent struct {
Tag string
Id TextureId
Error error
}
type RenderTargetCreatedEvent struct {
2013-12-07 17:35:24 +01:00
Tag string
Id RenderTargetId
Error error
}
type TextureFactoryEvents interface {
TextureCreated() <-chan TextureCreatedEvent
RenderTargetCreated() <-chan RenderTargetCreatedEvent
}
2013-12-06 18:20:48 +01:00
// TODO: Rename this later
type TextureFactory2 interface {
CreateRenderTarget(tag string, width, height int)
CreateTexture(tag string, img image.Image)
TextureFactoryEvents
}
2013-12-07 17:35:24 +01:00
// TODO: Deprecated
type TextureFactory interface {
CreateRenderTarget(tag string, width, height int) (RenderTargetId, error)
CreateTextureFromImage(tag string, img image.Image) (TextureId, error)
//TextureFactoryEvents
}