2019-03-05 20:52:18 +00:00
|
|
|
package allg5ui
|
|
|
|
|
|
|
|
import (
|
2019-03-13 18:49:00 +00:00
|
|
|
"image"
|
|
|
|
|
2019-03-05 20:52:18 +00:00
|
|
|
"opslag.de/schobers/zntg/allg5"
|
|
|
|
"opslag.de/schobers/zntg/ui"
|
|
|
|
)
|
|
|
|
|
|
|
|
var _ ui.Image = &uiImage{}
|
|
|
|
|
|
|
|
type uiImage struct {
|
|
|
|
bmp *allg5.Bitmap
|
|
|
|
}
|
|
|
|
|
2019-03-13 18:49:00 +00:00
|
|
|
func (i *uiImage) Destroy() {
|
|
|
|
i.bmp.Destroy()
|
|
|
|
}
|
|
|
|
|
2019-03-05 20:52:18 +00:00
|
|
|
func (i *uiImage) Height() float32 {
|
|
|
|
return float32(i.bmp.Height())
|
|
|
|
}
|
|
|
|
|
2019-03-13 18:49:00 +00:00
|
|
|
func (i *uiImage) Image() image.Image {
|
|
|
|
return i.bmp.Image()
|
2019-03-05 20:52:18 +00:00
|
|
|
}
|
|
|
|
|
2019-03-13 18:49:00 +00:00
|
|
|
func (i *uiImage) Width() float32 {
|
|
|
|
return float32(i.bmp.Width())
|
2019-03-05 20:52:18 +00:00
|
|
|
}
|