From f6a58c48788a75065c1d56eff93d3ad1499702ad Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Mon, 18 May 2020 11:39:07 +0200 Subject: [PATCH] Fixed incorrect clipping of the rendered tiles. --- projection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projection.go b/projection.go index fe1bb0b..c90d7d1 100644 --- a/projection.go +++ b/projection.go @@ -80,7 +80,7 @@ func (p *projection) visibleTiles(action func(int, int, geom.Point)) { topLeft := p.screenToMap(visible.Min.X, visible.Min.Y) topRight := p.screenToMap(visible.Max.X, visible.Min.Y) bottomLeft := p.screenToMap(visible.Min.X, visible.Max.Y) - bottomRight := p.screenToMap(visible.Max.Y, visible.Max.Y) + bottomRight := p.screenToMap(visible.Max.X, visible.Max.Y) minY, maxY := int(Floor32(topRight.Y)), int(Ceil32(bottomLeft.Y)) minX, maxX := int(Floor32(topLeft.X)), int(Ceil32(bottomRight.X)) for y := minY; y <= maxY; y++ {