QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgstiledscenetexturerenderer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstiledscenetexturerenderer.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 QGSTILEDSCENETEXTURERENDERER_H
19#define QGSTILEDSCENETEXTURERENDERER_H
20
22#include "qgis_core.h"
23#include "qgis_sip.h"
24
25class QgsFillSymbol;
26
34{
35 public:
36
42
43 QString type() const override;
44 QgsTiledSceneRenderer *clone() const override;
45 QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const override;
46 Qgis::TiledSceneRendererFlags flags() 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
55 static QgsTiledSceneRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) SIP_FACTORY;
56
62 static QgsFillSymbol *createDefaultFillSymbol() SIP_FACTORY;
63
69 QgsFillSymbol *fillSymbol() const;
70
78 void setFillSymbol( QgsFillSymbol *symbol SIP_TRANSFER );
79
80 private:
81 std::unique_ptr< QgsFillSymbol> mFillSymbol;
82};
83
84#endif // QGSTILEDSCENETEXTURERENDERER_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.
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 textures.
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:76