mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-19 02:38:32 +00:00
DIRECTOR: don't draw outline shape when we get linesize < 0
This commit is contained in:
parent
8c792cd2a4
commit
8d270071cf
@ -156,9 +156,6 @@ void inkDrawPixel(int x, int y, int src, void *data) {
|
||||
if (p->ms) {
|
||||
// Get the pixel that macDrawPixel will give us, but store it to apply the
|
||||
// ink later
|
||||
// if we have lineSize <= 0, means we are not drawing anything. so we may return directly.
|
||||
if (p->ms->lineSize <= 0)
|
||||
return;
|
||||
tmpDst = *dst;
|
||||
(p->_wm->getDrawPixel())(x, y, src, p->ms->pd);
|
||||
src = *dst;
|
||||
|
@ -214,6 +214,9 @@ void Window::inkBlitShape(DirectorPlotData *pd, Common::Rect &srcRect) {
|
||||
Graphics::drawFilledRect(fillAreaRect, pd->ms->foreColor, g_director->getInkDrawPixel(), pd);
|
||||
// fall through
|
||||
case kOutlinedRectangleSprite:
|
||||
// if we have lineSize <= 0, means we are not drawing anything. so we may return directly.
|
||||
if (pd->ms->lineSize <= 0)
|
||||
break;
|
||||
pd->ms->pd = &plotStroke;
|
||||
Graphics::drawRect(strokeRect, pd->ms->foreColor, g_director->getInkDrawPixel(), pd);
|
||||
break;
|
||||
@ -222,6 +225,8 @@ void Window::inkBlitShape(DirectorPlotData *pd, Common::Rect &srcRect) {
|
||||
Graphics::drawRoundRect(fillAreaRect, 12, pd->ms->foreColor, true, g_director->getInkDrawPixel(), pd);
|
||||
// fall through
|
||||
case kOutlinedRoundedRectangleSprite:
|
||||
if (pd->ms->lineSize <= 0)
|
||||
break;
|
||||
pd->ms->pd = &plotStroke;
|
||||
Graphics::drawRoundRect(strokeRect, 12, pd->ms->foreColor, false, g_director->getInkDrawPixel(), pd);
|
||||
break;
|
||||
@ -230,6 +235,8 @@ void Window::inkBlitShape(DirectorPlotData *pd, Common::Rect &srcRect) {
|
||||
Graphics::drawEllipse(fillAreaRect.left, fillAreaRect.top, fillAreaRect.right, fillAreaRect.bottom, pd->ms->foreColor, true, g_director->getInkDrawPixel(), pd);
|
||||
// fall through
|
||||
case kOutlinedOvalSprite:
|
||||
if (pd->ms->lineSize <= 0)
|
||||
break;
|
||||
pd->ms->pd = &plotStroke;
|
||||
Graphics::drawEllipse(strokeRect.left, strokeRect.top, strokeRect.right, strokeRect.bottom, pd->ms->foreColor, false, g_director->getInkDrawPixel(), pd);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user