diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/macgui/macwindowmanager.cpp | 6 | ||||
-rw-r--r-- | graphics/macgui/macwindowmanager.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 12cd391f92..19448053a3 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -295,7 +295,7 @@ void macDrawPixel(int x, int y, int color, void *data) { uint yu = (uint)y; *((byte *)p->surface->getBasePtr(xu, yu)) = - (pat[yu % 8] & (1 << (7 - xu % 8))) ? + (pat[(yu - p->fillOriginY) % 8] & (1 << (7 - (xu - p->fillOriginX) % 8))) ? color : p->bgColor; } } else { @@ -310,7 +310,7 @@ void macDrawPixel(int x, int y, int color, void *data) { uint xu = (uint)x; // for letting compiler optimize it uint yu = (uint)y; *((byte *)p->surface->getBasePtr(xu, yu)) = - (pat[yu % 8] & (1 << (7 - xu % 8))) ? + (pat[(yu - p->fillOriginY) % 8] & (1 << (7 - (xu - p->fillOriginX) % 8))) ? color : p->bgColor; } } @@ -319,7 +319,7 @@ void macDrawPixel(int x, int y, int color, void *data) { void MacWindowManager::drawDesktop() { Common::Rect r(_screen->getBounds()); - MacPlotData pd(_screen, &_patterns, kPatternCheckers, 1, _colorWhite); + MacPlotData pd(_screen, &_patterns, kPatternCheckers, 0, 0, 1, _colorWhite); Graphics::drawRoundRect(r, kDesktopArc, _colorBlack, true, macDrawPixel, &pd); diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h index c412e64f0a..5846bcba07 100644 --- a/graphics/macgui/macwindowmanager.h +++ b/graphics/macgui/macwindowmanager.h @@ -83,11 +83,13 @@ struct MacPlotData { Graphics::ManagedSurface *surface; MacPatterns *patterns; uint fillType; + int fillOriginX; + int fillOriginY; int thickness; uint bgColor; - MacPlotData(Graphics::ManagedSurface *s, MacPatterns *p, int f, int t, uint bg) : - surface(s), patterns(p), fillType(f), thickness(t), bgColor(bg) { + MacPlotData(Graphics::ManagedSurface *s, MacPatterns *p, uint f, int fx, int fy, int t, uint bg) : + surface(s), patterns(p), fillType(f), fillOriginX(fx), fillOriginY(fy), thickness(t), bgColor(bg) { } }; |