class Core::Portable::BitmapManager

Overview

#include <corebitmap.h>

class BitmapManager: public Core::Portable::StaticSingleton
{
public:
    // structs

    struct InternalStore;

    // fields

     memoryLimit;
    InternalStore* store;

    // methods

    PROPERTY_VARIABLE(BitmapPixelFormat, defaultFormat, DefaultFormat);
    MemoryLimit int loadBitmaps(FilePackage& package, bool delayDecoding = false);
    BitmapReference getBitmap(CStringPtr name);
    void idle();
    InternalStore& getStore();
    void addBitmap(CStringPtr name, BitmapDescriptor* descriptor);
    bool loadBitmap(BitmapDescriptor& descriptor);
    bool isAboveMemoryLimit() const;
    void reduceBitmaps();
};

Inherited Members

public:
    // methods

    static T& instance();
    DeletableList& instance();

Detailed Documentation

Methods

PROPERTY_VARIABLE(BitmapPixelFormat, defaultFormat, DefaultFormat)

Set default format for color bitmaps.

Set bitmap memory limit for caching (in bytes, default is 0 - no limit).

MemoryLimit int loadBitmaps(FilePackage& package, bool delayDecoding = false)

Load bitmaps from package defined in ‘bitmaps.json/.ubj’ file.

BitmapReference getBitmap(CStringPtr name)

Get bitmap by name.

void idle()

Give idle time for delayed bitmap decoding (optional).