SetImage sets the image from the specified image file
(imgfile string)
| 61 | |
| 62 | // SetImage sets the image from the specified image file |
| 63 | func (i *Image) SetImage(imgfile string) error { |
| 64 | |
| 65 | tex, err := texture.NewTexture2DFromImage(imgfile) |
| 66 | if err != nil { |
| 67 | return err |
| 68 | } |
| 69 | i.SetTexture(tex) |
| 70 | return nil |
| 71 | } |
nothing calls this directly
no test coverage detected