aboutsummaryrefslogtreecommitdiffstats
path: root/softwarecontext/rectanglenode.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-08-07 15:15:38 +0200
committerLars Knoll <lars.knoll@digia.com>2014-08-08 15:56:55 +0300
commitda54d17352dfc4070eb6fa105ce853e3d35490ef (patch)
tree1076956f67cb0355c3b525e271c17a24f36906a5 /softwarecontext/rectanglenode.cpp
parent78a6d2d7340fbfdc5b5dbfd9974435714bb786fb (diff)
First implementation of images and rectangles
Change-Id: Ia905d6dfe3d9922ef820085fedc5195be8ace1da Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'softwarecontext/rectanglenode.cpp')
-rw-r--r--softwarecontext/rectanglenode.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/softwarecontext/rectanglenode.cpp b/softwarecontext/rectanglenode.cpp
new file mode 100644
index 0000000000..6dde7058c2
--- /dev/null
+++ b/softwarecontext/rectanglenode.cpp
@@ -0,0 +1,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);
+}