zntg/ui/allg5ui/image.go
Sander Schobers 19daffd110 Added UI elements.
Reversed order of operands when comparing with nil/0 .
2019-03-05 21:52:18 +01:00

25 lines
356 B
Go

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