QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsfillsymbol.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsfillsymbol.h
3 ---------------------
4 begin : November 2009
5 copyright : (C) 2009 by Martin Dobias
6 email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSFILLSYMBOL_H
17#define QGSFILLSYMBOL_H
18
19#include "qgis.h"
20#include "qgis_core.h"
21#include "qgssymbol.h"
22
29class CORE_EXPORT QgsFillSymbol : public QgsSymbol
30{
31 public:
32
37 static std::unique_ptr< QgsFillSymbol > createSimple( const QVariantMap &properties );
38
45 void setAngle( double angle ) const;
46
62 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, const QgsFeature *f, QgsRenderContext &context, int layer = -1, bool selected = false );
63
64 QgsFillSymbol *clone() const override SIP_FACTORY;
65
66 private:
67
68 void renderPolygonUsingLayer( QgsSymbolLayer *layer, const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) const;
70 QRectF polygonBounds( const QPolygonF &points, const QVector<QPolygonF> *rings ) const;
72 QVector<QPolygonF> *translateRings( const QVector<QPolygonF> *rings, double dx, double dy ) const;
73};
74
75#endif // QGSFILLSYMBOL_H
76
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
void setAngle(double angle) const
static std::unique_ptr< QgsFillSymbol > createSimple(const QVariantMap &properties)
Create a fill symbol with one symbol layer: SimpleFill with specified properties.
QgsFillSymbol(const QgsSymbolLayerList &layers=QgsSymbolLayerList())
Constructor for QgsFillSymbol, with the specified list of initial symbol layers.
void renderPolygon(const QPolygonF &points, const QVector< QPolygonF > *rings, const QgsFeature *f, QgsRenderContext &context, int layer=-1, bool selected=false)
Renders the symbol using the given render context.
Contains information about the context of a rendering operation.
Abstract base class for symbol layers.
Encapsulates the context in which a symbol is being rendered.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.
Q_DECL_DEPRECATED const QgsVectorLayer * layer() const
QgsSymbol(Qgis::SymbolType type, const QgsSymbolLayerList &layers)
Constructor for a QgsSymbol of the specified type.
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:84
QList< QgsSymbolLayer * > QgsSymbolLayerList
Definition qgssymbol.h:30