mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-12-22 02:17:33 +00:00
Fix stitched image cache generation
This commit is contained in:
parent
a0d5c13557
commit
6d028d4064
@ -62,9 +62,9 @@ func NewStitchedImage(tiles ImageTiles, bounds image.Rectangle, blendMethod Stit
|
||||
}
|
||||
|
||||
// Generate cache image rows.
|
||||
rows := bounds.Dy() / cacheRowHeight
|
||||
maxRow := (bounds.Dy() - 1) / cacheRowHeight
|
||||
var cacheRows []StitchedImageCache
|
||||
for i := 0; i < rows; i++ {
|
||||
for i := 0; i <= maxRow; i++ {
|
||||
rect := image.Rect(bounds.Min.X, bounds.Min.Y+i*cacheRowHeight, bounds.Max.X, bounds.Min.Y+(i+1)*cacheRowHeight)
|
||||
cacheRows = append(cacheRows, NewStitchedImageCache(stitchedImage, rect.Intersect(bounds)))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user