MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / imageSize

Method imageSize

source/game/StarImageMetadataDatabase.cpp:25–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25Vec2U ImageMetadataDatabase::imageSize(AssetPath const& path) const {
26 MutexLocker locker(m_mutex);
27 if (auto cached = m_sizeCache.ptr(path))
28 return *cached;
29
30 locker.unlock();
31 Vec2U size = calculateImageSize(path);
32
33 locker.lock();
34 m_sizeCache.set(path, size);
35 return size;
36}
37
38List<Vec2I> ImageMetadataDatabase::imageSpaces(AssetPath const& path, Vec2F position, float fillLimit, bool flip) const {
39 SpacesEntry key = make_tuple(path, Vec2I::round(position), fillLimit, flip);

Callers 11

StarDrawable.cppFile · 0.45
makeImageMethod · 0.45
DrawableMethod · 0.45
boundBoxMethod · 0.45
PlantMethod · 0.45
scanSpacesAndRootsMethod · 0.45
WorldStructureMethod · 0.45
updateMethod · 0.45
particleForPlantPartMethod · 0.45
buildLayerMethod · 0.45

Calls 4

ptrMethod · 0.45
unlockMethod · 0.45
lockMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected