diff options
author | Eugene Sandulenko | 2016-01-01 02:16:00 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-01-01 02:16:00 +0100 |
commit | 03e3f80bffcb24c2524b62b6602aad8698315b42 (patch) | |
tree | fcca80edeca323988bcc16c02220cfd6674b7313 | |
parent | ac87bc9671822ce26e9dd4a5f77b23de83a71b63 (diff) | |
download | scummvm-rg350-03e3f80bffcb24c2524b62b6602aad8698315b42.tar.gz scummvm-rg350-03e3f80bffcb24c2524b62b6602aad8698315b42.tar.bz2 scummvm-rg350-03e3f80bffcb24c2524b62b6602aad8698315b42.zip |
WAGE: Mac has roundrect on desktop. Render it
-rw-r--r-- | engines/wage/design.cpp | 7 | ||||
-rw-r--r-- | engines/wage/design.h | 5 | ||||
-rw-r--r-- | engines/wage/gui.cpp | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index e65bbd467c..555ab5edcc 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -436,12 +436,17 @@ void Design::drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int drawHLine(rect.left, rect.right, y, color, drawPixel, &pd); } - void Design::drawFilledRect(Common::Rect &rect, int color, void (*plotProc)(int, int, int, void *), void *data) { for (int y = rect.top; y <= rect.bottom; y++) drawHLine(rect.left, rect.right, y, color, plotProc, data); } +void Design::drawFilledRoundRect(Graphics::Surface *surface, Common::Rect &rect, int arc, int color, Patterns &patterns, byte fillType) { + plotData pd(surface, &patterns, fillType); + + drawFilledRoundRect(rect, arc, color, drawPixel, &pd); +} + // http://members.chello.at/easyfilter/bresenham.html void Design::drawFilledRoundRect(Common::Rect &rect, int arc, int color, void (*plotProc)(int, int, int, void *), void *data) { if (rect.height() < rect.width()) { diff --git a/engines/wage/design.h b/engines/wage/design.h index 8e79a84530..f876d1b550 100644 --- a/engines/wage/design.h +++ b/engines/wage/design.h @@ -69,6 +69,7 @@ public: void paint(Graphics::Surface *canvas, Patterns &patterns, bool mask, int x, int y); static void drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType); + static void drawFilledRoundRect(Graphics::Surface *surface, Common::Rect &rect, int arc, int color, Patterns &patterns, byte fillType); private: byte *_data; @@ -88,12 +89,12 @@ private: void drawBitmap(Graphics::Surface *surface, Common::ReadStream &in, bool mask); void drawFilledRect(Common::Rect &rect, int color, void (*plotProc)(int, int, int, void *), void *data); - void drawFilledRoundRect(Common::Rect &rect, int arc, int color, void (*plotProc)(int, int, int, void *), void *data); + static void drawFilledRoundRect(Common::Rect &rect, int arc, int color, void (*plotProc)(int, int, int, void *), void *data); void drawPolygonScan(int *polyX, int *polyY, int npoints, Common::Rect &bbox, int color, void (*plotProc)(int, int, int, void *), void *data); void drawEllipse(int x0, int y0, int x1, int y1, bool filled, void (*plotProc)(int, int, int, void *), void *data); static void drawHLine(int x1, int x2, int y, int color, void (*plotProc)(int, int, int, void *), void *data); - void drawVLine(int x, int y1, int y2, int color, void (*plotProc)(int, int, int, void *), void *data); + static void drawVLine(int x, int y1, int y2, int color, void (*plotProc)(int, int, int, void *), void *data); void drawThickLine (int x1, int y1, int x2, int y2, int thick, int color, void (*plotProc)(int, int, int, void *), void *data); }; diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 92758c0a9c..713a1c2b5b 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -120,7 +120,6 @@ Gui::Gui() { Patterns p; p.push_back(checkers); - Common::Rect r(0, 0, _screen.w, _screen.h); _scrollPos = 0; _builtInFonts = false; @@ -132,7 +131,8 @@ Gui::Gui() { _cursorIsArrow = true; CursorMan.showMouse(true); - Design::drawFilledRect(&_screen, r, kColorBlack, p, 1); + Common::Rect r(0, 0, _screen.w - 1, _screen.h - 1); + Design::drawFilledRoundRect(&_screen, r, 7, kColorBlack, p, 1); loadFonts(); } |