aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/design.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2015-12-20 13:53:51 +0100
committerEugene Sandulenko2015-12-27 15:40:57 +0100
commita4ba9313be311637ac9c1a6185184b497182c540 (patch)
tree818f9ae37614230ee3ae6112d4e0ac59d01feeff /engines/wage/design.cpp
parent900903324d0adda5f8bd574b9b914088a13b5ac5 (diff)
downloadscummvm-rg350-a4ba9313be311637ac9c1a6185184b497182c540.tar.gz
scummvm-rg350-a4ba9313be311637ac9c1a6185184b497182c540.tar.bz2
scummvm-rg350-a4ba9313be311637ac9c1a6185184b497182c540.zip
WAGE: Fixed think transparent rectangles
Diffstat (limited to 'engines/wage/design.cpp')
-rw-r--r--engines/wage/design.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp
index aab2eb7f37..bafb3ad63f 100644
--- a/engines/wage/design.cpp
+++ b/engines/wage/design.cpp
@@ -82,12 +82,16 @@ void Design::paint(Graphics::Surface *canvas, Patterns &patterns, bool mask) {
/*
plotData pd(canvas, &patterns, 8);
- Common::Rect inn(50, 50, 80, 150);
+ int x1 = 50, y1 = 50, x2 = 200, y2 = 200, borderThickness = 30;
+ Common::Rect inn(x1-5, y1-5, x2+5, y2+5);
drawFilledRect(inn, kColorGray, drawPixelPlain, &pd);
- drawFilledRoundRect(inn, 10, kColorBlack, drawPixelPlain, &pd);
- Common::Rect inn2(100, 100, 200, 110);
- drawFilledRect(inn2, kColorGray, drawPixelPlain, &pd);
- drawFilledRoundRect(inn2, 10, kColorBlack, drawPixelPlain, &pd);
+
+ drawThickLine(x1, y1, x2-borderThickness, y1, borderThickness, kColorBlack, drawPixel, &pd);
+ drawThickLine(x2-borderThickness, y1, x2-borderThickness, y2, borderThickness, kColorBlack, drawPixel, &pd);
+ drawThickLine(x2-borderThickness, y2-borderThickness, x1, y2-borderThickness, borderThickness, kColorBlack, drawPixel, &pd);
+ drawThickLine(x1, y2-borderThickness, x1, y1, borderThickness, kColorBlack, drawPixel, &pd);
+ drawThickLine(x2+10, y2+10, x2+100, y2+100, borderThickness, kColorBlack, drawPixel, &pd);
+
g_system->copyRectToScreen(canvas->getPixels(), canvas->pitch, 0, 0, canvas->w, canvas->h);
while (true) {
@@ -182,10 +186,10 @@ void Design::drawRect(Graphics::Surface *surface, Common::ReadStream &in, bool m
drawFilledRect(inner, kColorBlack, drawPixel, &pd);
} else {
- drawThickLine(x1, y1, x2, y1, borderThickness, kColorBlack, drawPixel, &pd);
- drawThickLine(x2, y1, x2, y2, borderThickness, kColorBlack, drawPixel, &pd);
- drawThickLine(x2, y2, x1, y2, borderThickness, kColorBlack, drawPixel, &pd);
- drawThickLine(x1, y2, x1, y1, borderThickness, kColorBlack, drawPixel, &pd);
+ drawThickLine(x1, y1, x2-borderThickness, y1, borderThickness, kColorBlack, drawPixel, &pd);
+ drawThickLine(x2-borderThickness, y1, x2-borderThickness, y2, borderThickness, kColorBlack, drawPixel, &pd);
+ drawThickLine(x2-borderThickness, y2-borderThickness, x1, y2-borderThickness, borderThickness, kColorBlack, drawPixel, &pd);
+ drawThickLine(x1, y2-borderThickness, x1, y1, borderThickness, kColorBlack, drawPixel, &pd);
}
}