Fixed incorrect clipping of the rendered tiles.

This commit is contained in:
Sander Schobers 2020-05-18 11:39:07 +02:00
parent 1f6729c037
commit f6a58c4878

View File

@ -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++ {