QGIS API Documentation  3.20.0-Odense (decaadbb31)
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_core.h"
20 #include "qgis.h"
21 #include "qgssymbol.h"
22 
29 class CORE_EXPORT QgsFillSymbol : public QgsSymbol
30 {
31  public:
32 
37  static QgsFillSymbol *createSimple( const QVariantMap &properties ) SIP_FACTORY;
38 
45  void setAngle( double angle );
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 );
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:56
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
Definition: qgsfillsymbol.h:30
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:38
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Definition: MathUtils.cpp:786
#define SIP_TRANSFER
Definition: qgis_sip.h:36
#define SIP_FACTORY
Definition: qgis_sip.h:76
QList< QgsSymbolLayer * > QgsSymbolLayerList
Definition: qgssymbol.h:27