|
QGIS API Documentation 3.99.0-Master (21b3aa880ba)
|
Encapsulates a font texture atlas. More...
#include <qgsfonttextureatlasgenerator.h>
Public Member Functions | |
| QgsFontTextureAtlas () | |
| QgsFontTextureAtlas (const QgsFontTextureAtlas &other) | |
| ~QgsFontTextureAtlas () | |
| QSize | atlasSize () const |
| Returns the total size required for the atlas, i.e. | |
| int | count () const |
| Returns the number of textures in the atlas. | |
| int | graphemeCount (const QString &string) const |
| Returns the number of graphemes to render for a given string. | |
| bool | isValid () const |
Returns true if the atlas is valid. | |
| QgsFontTextureAtlas & | operator= (const QgsFontTextureAtlas &other) |
| QPoint | pixelOffsetForGrapheme (const QString &string, int graphemeIndex) const |
| Returns the pixel offset at which the texture for the matching grapheme should be placed. | |
| QRect | rect (const QString &grapheme) const |
| Returns the packed rectangle for the texture for the specified grapheme. | |
| QImage | renderAtlasTexture () const |
| Renders the combined texture atlas, containing all required characters. | |
| QImage | renderDebugTexture () const |
| Renders a debug texture. | |
| QRect | textureRectForGrapheme (const QString &string, int graphemeIndex) const |
| Returns the packed rectangle for the texture for the matching grapheme. | |
| int | totalWidth (const QString &string) const |
| Returns the total width (in pixels) required for a given string. | |
Friends | |
| class | QgsFontTextureAtlasGenerator |
Encapsulates a font texture atlas.
QgsFontTextureAtlas contains the packed texture atlas for a font, along with the associated text metrics for rendering.
See QgsFontTextureAtlasGenerator for a class which automatically creates texture atlases.
Definition at line 43 of file qgsfonttextureatlasgenerator.h.
|
default |
|
default |
|
default |
|
inline |
Returns the total size required for the atlas, i.e.
the total size for the texture.
Definition at line 61 of file qgsfonttextureatlasgenerator.h.
| int QgsFontTextureAtlas::count | ( | ) | const |
Returns the number of textures in the atlas.
Definition at line 76 of file qgsfonttextureatlasgenerator.cpp.
| int QgsFontTextureAtlas::graphemeCount | ( | const QString & | string | ) | const |
Returns the number of graphemes to render for a given string.
The string must match one of the strings passed to QgsFontTextureAtlasGenerator when creating the texture atlas.
Definition at line 90 of file qgsfonttextureatlasgenerator.cpp.
|
inline |
Returns true if the atlas is valid.
Definition at line 55 of file qgsfonttextureatlasgenerator.h.
|
default |
| QPoint QgsFontTextureAtlas::pixelOffsetForGrapheme | ( | const QString & | string, |
| int | graphemeIndex ) const |
Returns the pixel offset at which the texture for the matching grapheme should be placed.
The string must match one of the strings passed to QgsFontTextureAtlasGenerator when creating the texture atlas.
Definition at line 108 of file qgsfonttextureatlasgenerator.cpp.
| QRect QgsFontTextureAtlas::rect | ( | const QString & | grapheme | ) | const |
Returns the packed rectangle for the texture for the specified grapheme.
Definition at line 81 of file qgsfonttextureatlasgenerator.cpp.
| QImage QgsFontTextureAtlas::renderAtlasTexture | ( | ) | const |
Renders the combined texture atlas, containing all required characters.
Definition at line 136 of file qgsfonttextureatlasgenerator.cpp.
| QImage QgsFontTextureAtlas::renderDebugTexture | ( | ) | const |
Renders a debug texture.
The debug texture renders all packed character rectangles with a unique color, and can be used to visualize the solution.
Definition at line 155 of file qgsfonttextureatlasgenerator.cpp.
| QRect QgsFontTextureAtlas::textureRectForGrapheme | ( | const QString & | string, |
| int | graphemeIndex ) const |
Returns the packed rectangle for the texture for the matching grapheme.
The string must match one of the strings passed to QgsFontTextureAtlasGenerator when creating the texture atlas.
Definition at line 122 of file qgsfonttextureatlasgenerator.cpp.
| int QgsFontTextureAtlas::totalWidth | ( | const QString & | string | ) | const |
Returns the total width (in pixels) required for a given string.
The string must match one of the strings passed to QgsFontTextureAtlasGenerator when creating the texture atlas.
Definition at line 99 of file qgsfonttextureatlasgenerator.cpp.
|
friend |
Definition at line 176 of file qgsfonttextureatlasgenerator.h.