Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ManaSymbolPixmapGenerator Class Reference

#include <pixel_map_generator.h>

Static Public Member Functions

static QPixmap generatePixmap (const QString &symbol, const QSize &size)
 Returns a smooth-scaled rendering of the given mana symbol icon.
static void clear ()

Static Private Member Functions

static const QPixmap & masterIcon (const QString &symbol)
 Renders symbol once at a fixed moderate size, so repeated scalings never re-rasterize the source file (SVG sources can be very expensive to rasterize).

Static Private Attributes

static QHash< QString, QPixmap > masterCache
static QHash< QString, QPixmap > scaledCache

Member Function Documentation

◆ clear()

void ManaSymbolPixmapGenerator::clear ( )
inlinestatic
Here is the caller graph for this function:

◆ generatePixmap()

QPixmap ManaSymbolPixmapGenerator::generatePixmap ( const QString & symbol,
const QSize & size )
static

Returns a smooth-scaled rendering of the given mana symbol icon.

Results are shared between all callers via a process-wide cache keyed by symbol and size, so scaling work is done once per distinct combination instead of once per widget creation or resize.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ masterIcon()

const QPixmap & ManaSymbolPixmapGenerator::masterIcon ( const QString & symbol)
staticprivate

Renders symbol once at a fixed moderate size, so repeated scalings never re-rasterize the source file (SVG sources can be very expensive to rasterize).

Here is the caller graph for this function:

Member Data Documentation

◆ masterCache

QHash< QString, QPixmap > ManaSymbolPixmapGenerator::masterCache
staticprivate

◆ scaledCache

QHash< QString, QPixmap > ManaSymbolPixmapGenerator::scaledCache
staticprivate

The documentation for this class was generated from the following files: