zntg/allg5ui/image.go

31 lines
430 B
Go

package allg5ui
import (
"image"
"opslag.de/schobers/allg5"
"opslag.de/schobers/zntg/ui"
)
var _ ui.Texture = &texture{}
type texture struct {
bmp *allg5.Bitmap
}
func (t *texture) Destroy() {
t.bmp.Destroy()
}
func (t *texture) Height() float32 {
return float32(t.bmp.Height())
}
func (t *texture) Texture() image.Image {
return t.bmp.Image()
}
func (t *texture) Width() float32 {
return float32(t.bmp.Width())
}