Kstars

ellipsenode.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 <QColor>
9#include <QSGNode>
10
12class QSGGeometry;
13class QSGGeometryNode;
14
15/**
16 * @class EllipseNode
17 * @short QSGTransformNode derived node used to draw ellipses
18 *
19 * @author Artem Fedoskin
20 * @version 1.0
21 */
23{
24 public:
25 explicit EllipseNode(const QColor &color = QColor(), int width = 1);
26
27 void setColor(QColor color);
28 void setLineWidth(int width);
29 /**
30 * @short Redraw ellipse with the given width, height and positions (x,y)
31 * @param x position by x
32 * @param y position by y
33 * @param width the width
34 * @param height the height
35 * @param filled - if true the ellipse will be filled with color
36 */
37 void updateGeometry(float x, float y, int width, int height, bool filled);
38
39 private:
40 QSGGeometryNode *m_geometryNode { nullptr };
41 QSGGeometry *m_geometry { nullptr };
42 QSGFlatColorMaterial *m_material { nullptr };
43 int m_width { -1 };
44 int m_height { -1 };
45 float m_x { -1 };
46 float m_y { -1 };
47};
QSGTransformNode derived node used to draw ellipses.
Definition ellipsenode.h:23
void updateGeometry(float x, float y, int width, int height, bool filled)
Redraw ellipse with the given width, height and positions (x,y)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.