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

Method IsTexture

resources.go:320–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318}
319
320func (resource *Resource) IsTexture() bool {
321 if resource.FinishedDownloading() {
322 resource.Parse()
323 return resource.Extension == ".tga" || resource.MimeType != "image/gif" && strings.Contains(resource.MimeType, "image")
324 }
325 return false
326}
327
328func (resource *Resource) AsImage() Image {
329 resource.Parse()

Callers 5

DestroyMethod · 0.95
NewImageContentsFunction · 0.80
UpdateMethod · 0.80
DrawMethod · 0.80
ValidResourceMethod · 0.80

Calls 3

FinishedDownloadingMethod · 0.95
ParseMethod · 0.95
ContainsMethod · 0.45

Tested by

no test coverage detected