blob: 6dde7058c2e5979ceb9f9c5fd0549ea208af7e0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#include "rectanglenode.h"
RectangleNode::RectangleNode()
{
setMaterial((QSGMaterial*)1);
setGeometry((QSGGeometry*)1);
}
void RectangleNode::setRect(const QRectF &rect)
{
m_rect = rect;
}
void RectangleNode::setColor(const QColor &color)
{
m_brush = color;
}
void RectangleNode::setPenColor(const QColor &color)
{
m_pen.setColor(color);
}
void RectangleNode::setPenWidth(qreal width)
{
m_pen.setWidthF(width);
}
void RectangleNode::setGradientStops(const QGradientStops &stops)
{
}
void RectangleNode::setRadius(qreal radius)
{
}
void RectangleNode::setAligned(bool aligned)
{
}
void RectangleNode::update()
{
}
void RectangleNode::paint(QPainter *painter)
{
painter->setPen(m_pen);
painter->setBrush(m_brush);
painter->drawRect(m_rect);
}
|