Compare commits
2 Commits
0d93d73c32
...
v0.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 07bcd119d7 | |||
| c51ce65c88 |
@@ -15,8 +15,6 @@ type System struct {
|
||||
type BackendLink interface {
|
||||
// NewTexture creates a new texture from an image.
|
||||
NewTexture (image.Image) canvas.TextureCloser
|
||||
// NewCanvas creates a new blank canvas with the specified bounds.
|
||||
NewCanvas (image.Rectangle) canvas.Canvas
|
||||
// NewSurface creates a new surface with the specified bounds.
|
||||
NewSurface (image.Rectangle) (SurfaceLink, error)
|
||||
}
|
||||
|
||||
@@ -31,10 +31,6 @@ func (this *backendLink) NewTexture (source image.Image) canvas.TextureCloser {
|
||||
return this.backend.NewTexture(source)
|
||||
}
|
||||
|
||||
func (this *backendLink) NewCanvas (bounds image.Rectangle) canvas.Canvas {
|
||||
return this.backend.NewCanvas(bounds)
|
||||
}
|
||||
|
||||
func (this *backendLink) NewSurface (bounds image.Rectangle) (system.SurfaceLink, error) {
|
||||
// TODO
|
||||
return nil, errors.New("x: not implemented")
|
||||
|
||||
@@ -361,7 +361,7 @@ func (this *window) reallocateCanvas () {
|
||||
|
||||
if larger || smaller {
|
||||
if this.xCanvas != nil {
|
||||
this.xCanvas.Destroy()
|
||||
this.xCanvas.Close()
|
||||
}
|
||||
this.xCanvas = xcanvas.NewCanvasFrom(xgraphics.New (
|
||||
this.backend.x,
|
||||
|
||||
Reference in New Issue
Block a user