WAGE: change the offset and padding when drawing design
This commit is contained in:
parent
85ecee5cde
commit
50ce3224a9
2 changed files with 5 additions and 3 deletions
|
@ -133,8 +133,10 @@ void Design::paint(Graphics::ManagedSurface *surface, Graphics::MacPatterns &pat
|
||||||
render(patterns);
|
render(patterns);
|
||||||
|
|
||||||
if (_bounds->width() && _bounds->height()) {
|
if (_bounds->width() && _bounds->height()) {
|
||||||
const int padding = 3;
|
const int padding = 20;
|
||||||
Common::Rect from(padding, padding, _bounds->width() - 2 * padding, _bounds->height() - 2 * padding);
|
// 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);
|
Common::Rect to(from);
|
||||||
to.moveTo(x, y);
|
to.moveTo(x, y);
|
||||||
surface->transBlitFrom(*_surface, from, to, kColorGreen);
|
surface->transBlitFrom(*_surface, from, to, kColorGreen);
|
||||||
|
|
|
@ -141,7 +141,7 @@ Scene::~Scene() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) {
|
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);
|
surface->fillRect(r, kColorWhite);
|
||||||
|
|
||||||
_design->paint(surface, *((WageEngine *)g_engine)->_world->_patterns, x, y);
|
_design->paint(surface, *((WageEngine *)g_engine)->_world->_patterns, x, y);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue