MCPcopy Create free account
hub / github.com/SolarLune/masterplan / ValidResource

Method ValidResource

contents.go:1596–1598  ·  view source on GitHub ↗

func (ic *ImageContents) handleRotation() { if ic.Resource != nil && ic.Card.Properties.Has("rotate") { angle := ic.Card.Properties.Get("rotate").AsFloat() if angle != 0 { if ic.Resource.IsTexture() { surf := ic.Resource.AsImage().Surface pixels := surf.Pixels() newSurf, err := s

()

Source from the content-addressed store, hash-verified

1594// }
1595
1596func (ic *ImageContents) ValidResource() bool {
1597 return ic.Resource != nil && ic.Resource.FinishedDownloading() && (ic.Resource.IsGIF() || ic.Resource.IsTexture())
1598}
1599
1600func (ic *ImageContents) LoadFile() {
1601

Callers 2

NewImageContentsFunction · 0.95
UpdateMethod · 0.95

Calls 3

FinishedDownloadingMethod · 0.80
IsGIFMethod · 0.80
IsTextureMethod · 0.80

Tested by

no test coverage detected