WAGE: change the offset and padding when drawing design

This commit is contained in:
ysj1173886760 2021-03-26 21:34:25 +08:00 committed by Eugene Sandulenko
parent 85ecee5cde
commit 50ce3224a9
2 changed files with 5 additions and 3 deletions

View File

@ -133,8 +133,10 @@ void Design::paint(Graphics::ManagedSurface *surface, Graphics::MacPatterns &pat
render(patterns);
if (_bounds->width() && _bounds->height()) {
const int padding = 3;
Common::Rect from(padding, padding, _bounds->width() - 2 * padding, _bounds->height() - 2 * padding);
const int padding = 20;
// Common::Rect from(padding, padding, _bounds->width() - 2 * padding, _bounds->height() - 2 * padding);
// in order to restore the design, we just cut the left and top part of that
Common::Rect from(padding, padding, _bounds->width(), _bounds->height());
Common::Rect to(from);
to.moveTo(x, y);
surface->transBlitFrom(*_surface, from, to, kColorGreen);

View File

@ -141,7 +141,7 @@ Scene::~Scene() {
}
void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) {
Common::Rect r(x + 5, y + 5, _design->getBounds()->width() + x - 10, _design->getBounds()->height() + y - 10);
Common::Rect r(x, y, surface->w + x, surface->h + y);
surface->fillRect(r, kColorWhite);
_design->paint(surface, *((WageEngine *)g_engine)->_world->_patterns, x, y);