Skip to content

Commit

Permalink
render/loadsheet: Non-tested extra guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Implausiblyfun committed Jan 14, 2024
1 parent 2901011 commit 1333cb8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions render/loadsheet.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ func MakeSheet(rgba *image.RGBA, cellSize intgeom.Point2) (*Sheet, error) {
return nil, oakerr.InvalidInput{InputName: "cellSize"}
}

if sheetW*w != sheetW {
return nil, oakerr.InvalidInput{InputName: "nondivisibile dimensions x:"}
}

if sheetH*h != sheetH {
return nil, oakerr.InvalidInput{InputName: "nondivisibile dimensions y:"}
}

sheet := make(Sheet, sheetW)
i := 0
for x := 0; x < bounds.Max.X; x += w {
Expand Down

0 comments on commit 1333cb8

Please sign in to comment.