From 1c47599312180d4718a9fa1f34956b895986ed3d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 14 Jul 2005 10:35:26 +0000 Subject: [PATCH] brought back drawdots() and drawrectangles() since the player sim needs them git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7138 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/x11/uibasic.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/uisimulator/x11/uibasic.c b/uisimulator/x11/uibasic.c index 05eb3fff82..2228e3b038 100644 --- a/uisimulator/x11/uibasic.c +++ b/uisimulator/x11/uibasic.c @@ -214,6 +214,39 @@ void screenhack() app_main(); } +/* used for the player sim */ +void drawdots(int color, struct coordinate *points, int count) +{ + XtAppLock(app); + XSetForeground(dpy, draw_gc, getcolor[color==0?0:3].pixel); + + while (count--) { + XFillRectangle(dpy, window, draw_gc, + points[count].x*display_zoom, + points[count].y*display_zoom, + display_zoom, + display_zoom); + } + XtAppUnlock(app); +} + +/* used for the player sim */ +void drawrectangles(int color, struct rectangle *points, int count) +{ + XtAppLock(app); + + XSetForeground(dpy, draw_gc, getcolor[color==0?0:3].pixel); + while (count--) { + XFillRectangle(dpy, window, draw_gc, + points[count].x*display_zoom, + points[count].y*display_zoom, + points[count].width*display_zoom, + points[count].height*display_zoom); + } + XtAppUnlock(app); +} + + void screen_redraw() { /* draw a border around the screen */