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

Method SetImage

gui/image.go:63–71  ·  view source on GitHub ↗

SetImage sets the image from the specified image file

(imgfile string)

Source from the content-addressed store, hash-verified

61
62// SetImage sets the image from the specified image file
63func (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}

Callers

nothing calls this directly

Calls 2

SetTextureMethod · 0.95
NewTexture2DFromImageFunction · 0.92

Tested by

no test coverage detected