Kstars

polynode.h
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5
6#pragma once
7
8#include "../../skyopacitynode.h"
9
10class QSGGeometryNode;
11class QSGGeometry;
13
14/**
15 * @class PolyNode
16 *
17 * @short A SkyOpacityNode derived class used for drawing of polygons (both filled and non-filled)
18 *
19 * @author Artem Fedoskin
20 * @version 1.0
21 */
23{
24 public:
25 /** @short Initialize geometry and material */
26 PolyNode();
27
28 void setColor(QColor color);
29
30 /** @short Set thickness of border line */
31 void setLineWidth(int width);
32
33 /**
34 * @short Update the geometry of polygon
35 * @param polygon - polygon that needs to be drawn
36 * @param filled - true if it should be filled
37 */
38 void updateGeometry(const QPolygonF &polygon, bool filled);
39
40 private:
41 QSGGeometryNode *m_geometryNode { nullptr };
42 QSGGeometry *m_geometry { nullptr };
43 QSGFlatColorMaterial *m_material { nullptr };
44};
A SkyOpacityNode derived class used for drawing of polygons (both filled and non-filled)
Definition polynode.h:23
void updateGeometry(const QPolygonF &polygon, bool filled)
Update the geometry of polygon.
Definition polynode.cpp:47
void setLineWidth(int width)
Set thickness of border line.
Definition polynode.cpp:38
PolyNode()
Initialize geometry and material.
Definition polynode.cpp:17
A wrapper for QSGOpacityNode that provides hide() and show() functions.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 1 2024 18:54:16 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.