zntg/ui/allg5ui/image.go
Sander Schobers ff51378aff Added button types.
Go image can be reconstructed from ui.Image/allg5.Bitmap.
Changed allg5.Scale from interface to struct.
2019-03-13 19:49:00 +01:00

31 lines
431 B
Go

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