summaryrefslogtreecommitdiff
path: root/plugingui/painter.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2011-10-18 14:49:43 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2011-10-18 14:49:43 +0200
commit3e85cc8bfccf63236e815eba64acd99fbe154daf (patch)
treec3988ded4857263cebff1515999fa5f44aa39b85 /plugingui/painter.cc
parentef47c71a29292ff9114a67d782e526ac662a1f32 (diff)
New Label and LED widgets.
Diffstat (limited to 'plugingui/painter.cc')
-rw-r--r--plugingui/painter.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/plugingui/painter.cc b/plugingui/painter.cc
index 3002c99..e207811 100644
--- a/plugingui/painter.cc
+++ b/plugingui/painter.cc
@@ -87,6 +87,31 @@ void Painter::drawText(int x, int y, std::string text)
#endif/*X11*/
}
+void Painter::drawPoint(int x, int y)
+{
+#ifdef X11
+ XDrawPoint(gctx->display, wctx->window, wctx->gc, x, y);
+#endif/*X11*/
+}
+
+void Painter::drawCircle(int x, int y, int r)
+{
+#ifdef X11
+ XDrawArc(gctx->display, wctx->window, wctx->gc, x, y, r, r, 0, 360 * 64);
+#endif/*X11*/
+}
+
+void Painter::drawFilledCircle(int x, int y, int r)
+{
+#ifdef X11
+ r *= 2;
+ for(int s = 1; s < r; s++)
+ XDrawArc(gctx->display, wctx->window, wctx->gc,
+ x - s / 2, y - s / 2, s, s,
+ 0, 360 * 64);
+#endif/*X11*/
+}
+
void Painter::flush()
{
#ifdef X11