|
QGIS API Documentation 3.99.0-Master (26c88405ac0)
|
Generates texture atlases by efficient packing of multiple input rectangles/images. More...
#include <qgstextureatlasgenerator.h>
Static Public Member Functions | |
| static QgsTextureAtlas | createFromImages (const QVector< QImage > &images, int maxSide=1000) |
| Creates a texture atlas for a set of images. | |
| static QgsTextureAtlas | createFromRects (const QVector< QRect > &rectangles, int maxSide=1000) |
| Creates a texture atlas for a set of rectangles. | |
Generates texture atlases by efficient packing of multiple input rectangles/images.
QgsTextureAtlasGenerator can be used to pack either images or raw rectangles. The static createFromRects() or createFromImages() methods should be called with the source images or rectangles, which will return a QgsTextureAtlas containing the results.
Definition at line 138 of file qgstextureatlasgenerator.h.
|
static |
Creates a texture atlas for a set of images.
The maxSide argument specifies the maximum permitted side size for the atlas. The calculated solution can only be less than or equal to this size - if it cannot fit, then algorithm will gracefully fail and return an invalid QgsTextureAtlas.
Definition at line 138 of file qgstextureatlasgenerator.cpp.
|
static |
Creates a texture atlas for a set of rectangles.
This method should be used when the generator is used to pack rectangle shapes only. No image will be associated with the rectangle.
The maxSide argument specifies the maximum permitted side size for the atlas. The calculated solution can only be less than or equal to this size - if it cannot fit, then algorithm will gracefully fail and return an invalid QgsTextureAtlas.
Definition at line 126 of file qgstextureatlasgenerator.cpp.