17 #ifndef QGSTEXTRENDERER_PRIVATE_H    18 #define QGSTEXTRENDERER_PRIVATE_H    22 #include "qgis_core.h"    29 #include <QSharedData>    44 class QgsTextBufferSettingsPrivate : 
public QSharedData
    48     QgsTextBufferSettingsPrivate()
    53     QgsTextBufferSettingsPrivate( 
const QgsTextBufferSettingsPrivate &other )
    54       : QSharedData( other )
    55       , enabled( other.enabled )
    57       , sizeUnit( other.sizeUnit )
    58       , sizeMapUnitScale( other.sizeMapUnitScale )
    59       , color( other.color )
    60       , opacity( other.opacity )
    61       , fillBufferInterior( other.fillBufferInterior )
    62       , joinStyle( other.joinStyle )
    63       , blendMode( other.blendMode )
    64       , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
    74     bool fillBufferInterior = 
false;
    75     Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
    76     QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
    77     std::unique_ptr< QgsPaintEffect > paintEffect;
    81 class QgsTextBackgroundSettingsPrivate : 
public QSharedData
    85     QgsTextBackgroundSettingsPrivate()
    86       : size( QSizeF( 0.0, 0.0 ) )
    87       , offset( QPointF( 0.0, 0.0 ) )
    88       , radii( QSizeF( 0.0, 0.0 ) )
    89       , fillColor( Qt::white )
    90       , strokeColor( Qt::darkGray )
    94     QgsTextBackgroundSettingsPrivate( 
const QgsTextBackgroundSettingsPrivate &other )
    95       : QSharedData( other )
    96       , enabled( other.enabled )
    98       , svgFile( other.svgFile )
    99       , sizeType( other.sizeType )
   101       , sizeUnits( other.sizeUnits )
   102       , sizeMapUnitScale( other.sizeMapUnitScale )
   103       , rotationType( other.rotationType )
   104       , rotation( other.rotation )
   105       , offset( other.offset )
   106       , offsetUnits( other.offsetUnits )
   107       , offsetMapUnitScale( other.offsetMapUnitScale )
   108       , radii( other.radii )
   109       , radiiUnits( other.radiiUnits )
   110       , radiiMapUnitScale( other.radiiMapUnitScale )
   111       , blendMode( other.blendMode )
   112       , fillColor( other.fillColor )
   113       , strokeColor( other.strokeColor )
   114       , opacity( other.opacity )
   115       , strokeWidth( other.strokeWidth )
   116       , strokeWidthUnits( other.strokeWidthUnits )
   117       , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
   118       , joinStyle( other.joinStyle )
   119       , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
   120       , markerSymbol( other.markerSymbol ? other.markerSymbol->clone() : nullptr )
   124     bool enabled = 
false;
   132     double rotation = 0.0;
   139     QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
   142     double opacity = 1.0;
   143     double strokeWidth = 0.0;
   146     Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
   147     std::unique_ptr< QgsPaintEffect > paintEffect;
   148     std::unique_ptr< QgsMarkerSymbol > markerSymbol;
   153 class QgsTextShadowSettingsPrivate : 
public QSharedData
   157     QgsTextShadowSettingsPrivate()
   158       : color( QColor( 0, 0, 0 ) )
   163     QgsTextShadowSettingsPrivate( 
const QgsTextShadowSettingsPrivate &other )
   164       : QSharedData( other )
   165       , enabled( other.enabled )
   166       , shadowUnder( other.shadowUnder )
   167       , offsetAngle( other.offsetAngle )
   168       , offsetDist( other.offsetDist )
   169       , offsetUnits( other.offsetUnits )
   170       , offsetMapUnitScale( other.offsetMapUnitScale )
   171       , offsetGlobal( other.offsetGlobal )
   172       , radius( other.radius )
   173       , radiusUnits( other.radiusUnits )
   174       , radiusMapUnitScale( other.radiusMapUnitScale )
   175       , radiusAlphaOnly( other.radiusAlphaOnly )
   176       , scale( other.scale )
   177       , color( other.color )
   178       , opacity( other.opacity )
   179       , blendMode( other.blendMode )
   183     bool enabled = 
false;
   185     int offsetAngle = 135;
   186     double offsetDist = 1.0;
   189     bool offsetGlobal = 
true;
   193     bool radiusAlphaOnly = 
false;
   196     double opacity = 0.7;
   197     QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
   201 class QgsTextMaskSettingsPrivate : 
public QSharedData
   205     QgsTextMaskSettingsPrivate()
   210     QgsTextMaskSettingsPrivate( 
const QgsTextMaskSettingsPrivate &other )
   211       : QSharedData( other )
   212       , enabled( other.enabled )
   215       , sizeUnit( other.sizeUnit )
   216       , sizeMapUnitScale( other.sizeMapUnitScale )
   217       , joinStyle( other.joinStyle )
   218       , opacity( other.opacity )
   219       , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
   220       , maskedSymbolLayers( other.maskedSymbolLayers )
   224     bool enabled = 
false;
   229     Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
   230     double opacity = 1.0;
   231     std::unique_ptr< QgsPaintEffect > paintEffect;
   236 class QgsTextSettingsPrivate : 
public QSharedData
   240     QgsTextSettingsPrivate()
   241       : textColor( Qt::black )
   245     QgsTextSettingsPrivate( 
const QgsTextSettingsPrivate &other )
   246       : QSharedData( other )
   247       , textFont( other.textFont )
   248       , textNamedStyle( other.textNamedStyle )
   249       , fontSizeUnits( other.fontSizeUnits )
   250       , fontSizeMapUnitScale( other.fontSizeMapUnitScale )
   251       , fontSize( other.fontSize )
   252       , textColor( other.textColor )
   253       , opacity( other.opacity )
   254       , blendMode( other.blendMode )
   255       , multilineHeight( other.multilineHeight )
   256       , orientation( other.orientation )
   257       , previewBackgroundColor( other.previewBackgroundColor )
   258       , mDataDefinedProperties( other.mDataDefinedProperties )
   263     QString textNamedStyle;
   266     double fontSize = 10 ; 
   268     double opacity = 1.0;
   269     QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
   270     double multilineHeight = 1.0 ; 
   272     QColor previewBackgroundColor = Qt::white;
   286 #endif // QGSTEXTRENDERER_PRIVATE_H TextOrientation
Text orientation. 
 
Shape size is determined by adding a buffer margin around text. 
 
RotationType
Methods for determining the rotation of the background shape. 
 
MaskType
Mask shape types. 
 
ShadowPlacement
Placement positions for text shadow. 
 
Vertically oriented text. 
 
QList< QgsSymbolLayerReference > QgsSymbolLayerReferenceList
 
SizeType
Methods for determining the background shape size. 
 
Draw shadow below all text components. 
 
ShapeType
Background shape types. 
 
Points (e.g., for font sizes) 
 
Struct for storing maximum and minimum scales for measurements in map units. 
 
Shape rotation is synced with text rotation. 
 
A grouped map of multiple QgsProperty objects, each referenced by a integer key value. 
 
RenderUnit
Rendering size units.