From 7fb14af6f97c80d1372bcdb9310e53f784350f69 Mon Sep 17 00:00:00 2001 From: Scott Percival Date: Sat, 4 Jan 2020 22:48:48 +0800 Subject: DIRECTOR: Fix margins on shape rendering --- engines/director/frame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index fe332ad4a4..9a15554142 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -664,7 +664,7 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) { byte spriteType = sp->_spriteType; byte foreColor = sp->_foreColor; byte backColor = sp->_backColor; - byte lineSize = sp->_lineSize + 1; + int lineSize = sp->_lineSize - 1; if (spriteType == kCastMemberSprite && sp->_cast != NULL) { switch (sp->_cast->_type) { case kCastShape: @@ -688,7 +688,7 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) { } foreColor = sc->_fgCol; backColor = sc->_bgCol; - lineSize = sc->_lineThickness; + lineSize = sc->_lineThickness - 1; ink = sc->_ink; // shapes should be rendered with transparency by default if (ink == kInkTypeCopy) { @@ -714,7 +714,7 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) { // No minus one on the pattern here! MacPlotData will do that for us! //Graphics::MacPlotData pd(&tmpSurface, &_vm->getPatterns(), 1, 1, sp->_backColor); Graphics::MacPlotData pd(&tmpSurface, &_vm->getPatterns(), sp->getPattern(), lineSize, backColor); - Common::Rect fillRect(shapeRect.width(), shapeRect.height()); + Common::Rect fillRect(MAX((int)shapeRect.width() - lineSize, 0), MAX((int)shapeRect.height() - lineSize, 0)); switch (spriteType) { case kRectangleSprite: -- cgit v1.2.3