mirror of
https://github.com/gosticks/gml.git
synced 2025-10-16 12:05:33 +00:00
added imgae provider reset method
This commit is contained in:
parent
510b53272a
commit
b4640f1732
10
imageitem.go
10
imageitem.go
@ -90,6 +90,16 @@ func (i *ImageItem) SetImage(img *Image) {
|
|||||||
C.gml_image_item_emit_changed(i.idC)
|
C.gml_image_item_emit_changed(i.idC)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (i *ImageItem) ResetImage() {
|
||||||
|
i.mutex.Lock()
|
||||||
|
i.img.Reset()
|
||||||
|
i.mutex.Unlock()
|
||||||
|
|
||||||
|
// Notify the change to QML.
|
||||||
|
// Don't need RunMain, because this emits only a signal.
|
||||||
|
C.gml_image_item_emit_changed(i.idC)
|
||||||
|
}
|
||||||
|
|
||||||
// Release this image item.
|
// Release this image item.
|
||||||
// Don't use it anymore after this call, because memory is freed.
|
// Don't use it anymore after this call, because memory is freed.
|
||||||
func (i *ImageItem) Release() {
|
func (i *ImageItem) Release() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user