Textures have been moved to the canvas module
This commit is contained in:
parent
dc31de0ecb
commit
fdea479ee7
|
@ -3,6 +3,7 @@ package tomo
|
|||
import "sort"
|
||||
import "image"
|
||||
import "errors"
|
||||
import "git.tebibyte.media/tomo/tomo/canvas"
|
||||
|
||||
// Backend is any Tomo implementation. Backends handle window creation, layout,
|
||||
// rendering, and events so that there can be as many platform-specific
|
||||
|
@ -18,7 +19,7 @@ type Backend interface {
|
|||
|
||||
// NewTexture creates a new texture from an image. The backend must
|
||||
// reject any texture that was not made by it.
|
||||
NewTexture (image.Image) Texture
|
||||
NewTexture (image.Image) canvas.Texture
|
||||
|
||||
// Run runs the event loop until Stop() is called, or the backend
|
||||
// experiences a fatal error.
|
||||
|
|
3
tomo.go
3
tomo.go
|
@ -3,6 +3,7 @@ package tomo
|
|||
import "sync"
|
||||
import "image"
|
||||
import "errors"
|
||||
import "git.tebibyte.media/tomo/tomo/canvas"
|
||||
|
||||
var backendLock sync.Mutex
|
||||
var backend Backend
|
||||
|
@ -82,7 +83,7 @@ func NewContainerBox () ContainerBox {
|
|||
|
||||
// NewTexture creates a new texture from an image. When no longer in use, it
|
||||
// must be freed using Close().
|
||||
func NewTexture (source image.Image) Texture {
|
||||
func NewTexture (source image.Image) canvas.Texture {
|
||||
assertBackend()
|
||||
return backend.NewTexture(source)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue