Skip to content

Commit

Permalink
Adding helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dusk125 committed Oct 14, 2021
1 parent 97224e1 commit c5561aa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/dusk125/pixelutils
go 1.17

require (
github.com/dusk125/rectpack v1.1.0
github.com/dusk125/rectpack v1.1.1
github.com/faiface/pixel v0.10.0
github.com/pzsz/voronoi v0.0.0-20130609164533-4314be88c79f
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dusk125/rectpack v1.1.0 h1:BrCW+X38AkngMKptaAZm7+rcurtyWTo66kLYn4w3XQ8=
github.com/dusk125/rectpack v1.1.0/go.mod h1:3aXSYTPZuKVJOiWq1yPkerNIGVZ6XbSwEYxziqVeqXA=
github.com/dusk125/rectpack v1.1.1 h1:iD3mIgNohj8+nPhkuqISmqgdvRE8g7AvrWr6fAP8OsY=
github.com/dusk125/rectpack v1.1.1/go.mod h1:3aXSYTPZuKVJOiWq1yPkerNIGVZ6XbSwEYxziqVeqXA=
github.com/faiface/glhf v0.0.0-20181018222622-82a6317ac380 h1:FvZ0mIGh6b3kOITxUnxS3tLZMh7yEoHo75v3/AgUqg0=
github.com/faiface/glhf v0.0.0-20181018222622-82a6317ac380/go.mod h1:zqnPFFIuYFFxl7uH2gYByJwIVKG7fRqlqQCbzAnHs9g=
github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3 h1:baVdMKlASEHrj19iqjARrPbaRisD7EuZEVJj6ZMLl1Q=
Expand Down
8 changes: 8 additions & 0 deletions packer/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ func (pack *Packer) DrawSub(id int, m pixel.Matrix) {
s := pixel.NewSprite(pack.pic, r)
s.Draw(pack.batch, m)
}

func (pack *Packer) Picture() pixel.Picture {
return pack.pic
}

func (pack *Packer) Bounds() pixel.Rect {
return pack.pic.Bounds()
}

0 comments on commit c5561aa

Please sign in to comment.