MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / getBitmap

Method getBitmap

gui/bitmap_loader.py:64–79  ·  view source on GitHub ↗
(cls, name, location)

Source from the content-addressed store, hash-verified

62
63 @classmethod
64 def getBitmap(cls, name, location):
65 if cls.dont_use_cached_bitmaps:
66 return cls.loadBitmap(name, location)
67
68 path = "%s%s" % (name, location)
69
70 if len(cls.cached_bitmaps) == cls.max_cached_bitmaps:
71 cls.cached_bitmaps.popitem(False)
72
73 if path not in cls.cached_bitmaps:
74 bmp = cls.loadBitmap(name, location)
75 cls.cached_bitmaps[path] = bmp
76 else:
77 bmp = cls.cached_bitmaps[path]
78
79 return bmp
80
81 @classmethod
82 def getImage(cls, name, location):

Callers 15

__init__Method · 0.45
__addInputFieldMethod · 0.45
__init__Method · 0.45
getStaticBitmapMethod · 0.45
getImageMethod · 0.45
__init__Method · 0.45
GetImageIndexMethod · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

loadBitmapMethod · 0.80

Tested by

no test coverage detected