MCPcopy
hub / github.com/g3n/engine / SetImageFromFile

Method SetImageFromFile

gui/imagelabel.go:120–128  ·  view source on GitHub ↗

SetImageFromFile sets the image label image from the specified filename If there is currently a selected icon, it is removed

(imgfile string)

Source from the content-addressed store, hash-verified

118// SetImageFromFile sets the image label image from the specified filename
119// If there is currently a selected icon, it is removed
120func (il *ImageLabel) SetImageFromFile(imgfile string) error {
121
122 img, err := NewImage(imgfile)
123 if err != nil {
124 return err
125 }
126 il.SetImage(img)
127 return nil
128}
129
130// SetColor sets the color of the label and icon text
131func (il *ImageLabel) SetColor(color *math32.Color) {

Callers 1

buildImageLabelFunction · 0.95

Calls 2

SetImageMethod · 0.95
NewImageFunction · 0.85

Tested by

no test coverage detected