Issues

Issue #670 resolved

Removing Geometry flipping

hahawoo
created an issue

I'm thinking Geometry shouldn't have a flip method, probably for the same reasons why Images don't have a flip method. The drawing function (draw/drawg) is responsible for transforming the drawn object, including scaling/flipping, and I'm not really sure if drawing a flipped Drawgable with a Geometry should be different to drawing a flipped Drawable.

Perhaps drawing a flipped Image is easier, because with an Image you can do something like:

love.graphics.draw(Image, x + Image:getWidth(), y, 0, -1, 1)

or with the origin at the center of the Image:

love.graphics.draw(Image, x, y, 0, 1, -1, Image:getWidth()/2, Image:getHeight()/2)

However, it's a bit trickier with Geometries. If this is an issue though, wouldn't it be more consistent with Images to expose getMaxX and getMaxY methods which are kinda equivalent to getWidth and getHeight?

love.graphics.draw(Image, Geometry, x + Geometry:getMaxX(), y, 0, -1, 1)

Comments (1)

  1. Log in to comment