QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgstiledscenewireframerenderer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstiledscenewireframerenderer.h
3 --------------------
4 begin : August 2023
5 copyright : (C) 2023 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSTILEDSCENEWIREFRAMERENDERER_H
19#define QGSTILEDSCENEWIREFRAMERENDERER_H
20
22#include "qgis_core.h"
23#include "qgis_sip.h"
24
25class QgsFillSymbol;
26class QgsLineSymbol;
27
35{
36 public:
37
43
44 QString type() const override;
45 QgsTiledSceneRenderer *clone() const override;
46 QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const override;
47 void renderTriangle( QgsTiledSceneRenderContext &context, const QPolygonF &triangle ) override;
48 void renderLine( QgsTiledSceneRenderContext &context, const QPolygonF &line ) override;
49 void startRender( QgsTiledSceneRenderContext &context ) override;
50 void stopRender( QgsTiledSceneRenderContext &context ) override;
51 Qgis::TiledSceneRendererFlags flags() const override;
52
56 static QgsTiledSceneRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) SIP_FACTORY;
57
63 static QgsFillSymbol *createDefaultFillSymbol() SIP_FACTORY;
64
70 QgsFillSymbol *fillSymbol() const;
71
79 void setFillSymbol( QgsFillSymbol *symbol SIP_TRANSFER );
80
86 static QgsLineSymbol *createDefaultLineSymbol() SIP_FACTORY;
87
93 QgsLineSymbol *lineSymbol() const;
94
102 void setLineSymbol( QgsLineSymbol *symbol SIP_TRANSFER );
103
110 bool useTextureColors() const;
111
118 void setUseTextureColors( bool enabled );
119
120 private:
121
122 std::unique_ptr< QgsFillSymbol> mFillSymbol;
123 std::unique_ptr< QgsLineSymbol> mLineSymbol;
124 bool mUseTextureColors = false;
125
126};
127
128#endif // QGSTILEDSCENEWIREFRAMERENDERER_H
QFlags< TiledSceneRendererFlag > TiledSceneRendererFlags
Flags which control how tiled scene 2D renderers behave.
Definition qgis.h:5311
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A line symbol type, for rendering LineString and MultiLineString geometries.
The class is used as a container of context for various read/write operations on other objects.
Encapsulates the render context for a 2D tiled scene rendering operation.
Abstract base class for 2d tiled scene renderers.
virtual void stopRender(QgsTiledSceneRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
virtual QString type() const =0
Returns the identifier of the renderer type.
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) const =0
Saves the renderer configuration to an XML element.
virtual QgsTiledSceneRenderer * clone() const =0
Create a deep copy of this renderer.
virtual void renderTriangle(QgsTiledSceneRenderContext &context, const QPolygonF &triangle)=0
Renders a triangle.
virtual void renderLine(QgsTiledSceneRenderContext &context, const QPolygonF &line)=0
Renders a line.
virtual void startRender(QgsTiledSceneRenderContext &context)
Must be called when a new render cycle is started.
virtual Qgis::TiledSceneRendererFlags flags() const
Returns flags which control how the renderer behaves.
Renders tiled scene layers using the raw primitive wireframes.
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:76