Fix eyedropper on tilemaps when zoom != 100%

This commit is contained in:
David Capello 2019-04-10 07:34:09 -03:00
parent fead20a7b5
commit 04ffea04ee

View File

@ -1242,7 +1242,8 @@ void Render::renderCel(
if (!tileset) if (!tileset)
return; return;
gfx::Rect tilesToDraw = grid.canvasToTile(gfx::Rect(area.src, area.size)); gfx::Rect tilesToDraw = grid.canvasToTile(
m_proj.remove(gfx::Rect(area.src, area.size)));
tilesToDraw &= cel_image->bounds(); tilesToDraw &= cel_image->bounds();
TRACE_RENDER_CEL("Drawing tilemap (%d %d %d %d)\n", TRACE_RENDER_CEL("Drawing tilemap (%d %d %d %d)\n",
tilesToDraw.x, tilesToDraw.y, tilesToDraw.w, tilesToDraw.h); tilesToDraw.x, tilesToDraw.y, tilesToDraw.w, tilesToDraw.h);