2

Is there a function in gloss that, given a Picture returns the width, height and coordinates of the smallest rectangle that encloses the Picture? If not, is it possible to write one?

user1023733
  • 805
  • 5
  • 14
  • 4
    I think, in the module `Graphics.Gloss.Game` there is a `boundingBox` functions which is what you need – lsmor Dec 19 '19 at 13:17
  • There does not seem to be any module called Graphics.Gloss.Game - could you provide a link to the documentation for the boundingBox function? – user1023733 Dec 19 '19 at 20:27
  • 1
    oh! apparently is a plug-in package around gloss called `gloss-game`. http://hackage.haskell.org/package/gloss-game-0.3.3.0/docs/Graphics-Gloss-Game.html. By the way, the `boundingBox` function seems to be incomplete. – lsmor Dec 20 '19 at 08:20

0 Answers0