diff --git a/backend.go b/backend.go index e4850d2..dba504a 100644 --- a/backend.go +++ b/backend.go @@ -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. diff --git a/tomo.go b/tomo.go index 1b512ca..c99d6d3 100644 --- a/tomo.go +++ b/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) }