summaryrefslogtreecommitdiff
path: root/plugingui/widget.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-09-04 21:15:39 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-09-04 21:15:39 +0200
commit6cd45908c3d62f845f1847009a0c38504f0d0082 (patch)
tree230b4cca4e7c84a7b16a5ab4c7aeca8597f0b167 /plugingui/widget.cc
parent107102992a25781d0fef5c4d38b799f5fe38dd24 (diff)
Add Canvas base class for the Painter to draw on. This is done in preparation for a new Painter unittest.
Diffstat (limited to 'plugingui/widget.cc')
-rw-r--r--plugingui/widget.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugingui/widget.cc b/plugingui/widget.cc
index 5cd013d..3d9d47c 100644
--- a/plugingui/widget.cc
+++ b/plugingui/widget.cc
@@ -133,6 +133,27 @@ size_t Widget::height()
return _height;
}
+PixelBufferAlpha& Widget::GetPixelBuffer()
+{
+ return pixbuf;
+}
+
+void Widget::beginPaint()
+{
+ if(_window)
+ {
+ _window->beginPaint();
+ }
+}
+
+void Widget::endPaint()
+{
+ if(_window)
+ {
+ _window->endPaint();
+ }
+}
+
size_t Widget::windowX()
{
size_t window_x = x();