translate
, scale
and rotate
would be enough to place an image at any position you'd like, right? I'm thinking about whether having at (20, 50) $ rotate 50 $ scale 2 $ drawImageCentered bla
scale 2 $ clip (0,0) (50, 50) $ scale 2 $ drawImage sky
rotate 90 around
(5,5) $ do ...
around
is Haskell syntax for "operator-like" function application, so the above is equivalent to around (rotate 90) (5,5) (do ...)
. Type signature:around :: (GosuIO a -> GosuIO a) -> (Double, Double) -> (GosuIO a -> GosuIO a)
around trans (x,y) = translate (x, y) . trans . translate (-x, -y)
> I wouldn't even have to use the transformation support, as my Haskell layer could translate most of it into "normal" drawRot calls behind the scenes.
record { font.draw(…) }.draw_as_quad(x1, y1, c1, … )
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill