func (me *Text) Free() { b.FreeImage(me.text) }
} else { w = key.Width } if key.Height == -1 { h = int(i.H()) } else { h = key.Height } if (i != nil) && (w != int(i.W()) || h != int(i.H()) || key.Angle != 0) { i = p.ResizeAngleOf(i, key.Angle, w, h) } return i }, func(me *flyweight, path key, img interface{}) { i := img.(*p.Image) p.FreeImage(i) }) type Image struct { img *p.Image key imageKey size starfish.Size srcBnds starfish.Bounds } //Loads the image at the given path, or nil if the image was not found. func LoadImage(path string) *Image { return LoadImageSize(path, -1, -1) } //Loads the image at the given path at the given angle, or nil if the image was not found.