aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorstevenhoefel2017-01-11 11:25:31 +1100
committerstevenhoefel2017-01-11 11:25:31 +1100
commit12032bb51860c203b817334648452a08f635d118 (patch)
treeba9ee8ebadd048955aeb1feff84b325f415cc1e3 /graphics/macgui
parent3f491601f3a53242c08d31ec7be3e0d109b422a0 (diff)
downloadscummvm-rg350-12032bb51860c203b817334648452a08f635d118.tar.gz
scummvm-rg350-12032bb51860c203b817334648452a08f635d118.tar.bz2
scummvm-rg350-12032bb51860c203b817334648452a08f635d118.zip
DIRECTOR: Round rectangles for Buttons. Improved TextCast alignment.
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/macwindowmanager.cpp18
-rw-r--r--graphics/macgui/macwindowmanager.h14
2 files changed, 17 insertions, 15 deletions
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index bad4ad3acc..ebc2a8f76d 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -217,18 +217,8 @@ void MacWindowManager::removeWindow(MacWindow *target) {
_needsRemoval = true;
}
-struct PlotData {
- Graphics::ManagedSurface *surface;
- MacPatterns *patterns;
- uint fillType;
- int thickness;
-
- PlotData(Graphics::ManagedSurface *s, MacPatterns *p, int f, int t) :
- surface(s), patterns(p), fillType(f), thickness(t) {}
-};
-
-static void drawPixel(int x, int y, int color, void *data) {
- PlotData *p = (PlotData *)data;
+void macDrawPixel(int x, int y, int color, void *data) {
+ MacPlotData *p = (MacPlotData *)data;
if (p->fillType > p->patterns->size())
return;
@@ -265,9 +255,9 @@ static void drawPixel(int x, int y, int color, void *data) {
void MacWindowManager::drawDesktop() {
Common::Rect r(_screen->getBounds());
- PlotData pd(_screen, &_patterns, kPatternCheckers, 1);
+ MacPlotData pd(_screen, &_patterns, kPatternCheckers, 1);
- Graphics::drawRoundRect(r, kDesktopArc, kColorBlack, true, drawPixel, &pd);
+ Graphics::drawRoundRect(r, kDesktopArc, kColorBlack, true, macDrawPixel, &pd);
g_system->copyRectToScreen(_screen->getPixels(), _screen->pitch, 0, 0, _screen->w, _screen->h);
}
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h
index 9f62403813..d359369415 100644
--- a/graphics/macgui/macwindowmanager.h
+++ b/graphics/macgui/macwindowmanager.h
@@ -65,6 +65,19 @@ class MacFontManager;
typedef Common::Array<byte *> MacPatterns;
+struct MacPlotData {
+ Graphics::ManagedSurface *surface;
+ MacPatterns *patterns;
+ uint fillType;
+ int thickness;
+
+ MacPlotData(Graphics::ManagedSurface *s, MacPatterns *p, int f, int t) :
+ surface(s), patterns(p), fillType(f), thickness(t) {
+ }
+};
+
+void macDrawPixel(int x, int y, int color, void *data);
+
/**
* A manager class to handle window creation, destruction,
* drawing, moving and event handling.
@@ -143,7 +156,6 @@ public:
* @return A MacPatterns object reference with the patterns.
*/
MacPatterns &getPatterns() { return _patterns; }
- void drawFilledRoundRect(ManagedSurface *surface, Common::Rect &rect, int arc, int color);
void pushArrowCursor();
void pushBeamCursor();