QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
This class allows the creation of mask ids based on the different label layers and to give a mask id from a label layer. More...
#include <qgsmaskidprovider.h>
Public Member Functions | |
int | insertLabelLayer (const QString &layerId, const QString &ruleId, const QSet< QgsSymbolLayerReference > &maskedSymbolLayers) |
Inserts a label layer to the provider and returns its associated mask id. More... | |
int | maskId (const QString &labelLayerId=QString(), const QString &labelRuleId=QString()) const |
Returns the mask id associated with a label layer and its optional label rule. More... | |
int | size () const |
Returns the number of identifiers allocated. More... | |
This class allows the creation of mask ids based on the different label layers and to give a mask id from a label layer.
Some rendering operations may need multiple mask images. This is the case for label rendering in which we can have different mask images: one different for each labeling rule for instance. Some label layers may need to share their mask images, some other need to have distinct mask images. Label layers share the same mask image if the set of symbol layers they mask is the same.
A "mask id" is then associated to each label layer. They are contiguous integer numbers starting at 0.
Definition at line 39 of file qgsmaskidprovider.h.
int QgsMaskIdProvider::insertLabelLayer | ( | const QString & | layerId, |
const QString & | ruleId, | ||
const QSet< QgsSymbolLayerReference > & | maskedSymbolLayers | ||
) |
Inserts a label layer to the provider and returns its associated mask id.
layerId | id of the vector layer that carries these labels |
ruleId | id of the labeling rule, if any |
maskedSymbolLayers | the symbol layers that are masked by this label layer |
Definition at line 19 of file qgsmaskidprovider.cpp.
int QgsMaskIdProvider::maskId | ( | const QString & | labelLayerId = QString() , |
const QString & | labelRuleId = QString() |
||
) | const |
Returns the mask id associated with a label layer and its optional label rule.
Returns -1 if not found.
Definition at line 36 of file qgsmaskidprovider.cpp.
int QgsMaskIdProvider::size | ( | ) | const |
Returns the number of identifiers allocated.
Definition at line 50 of file qgsmaskidprovider.cpp.