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