Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change SpriteBatch.draw arguments from int to float #600

Closed
badlogic opened this issue Sep 14, 2013 · 3 comments
Closed

Change SpriteBatch.draw arguments from int to float #600

badlogic opened this issue Sep 14, 2013 · 3 comments
Labels

Comments

@badlogic
Copy link
Member

From dasac...@gmail.com on June 17, 2010 05:04:54

This is a feature request. I'm not experienced with java so I dont know if there are any implications to this.

Currently the arguments: x, y, originX, originY are accepted as int. Their immediate use inside of SpriteBatch .draw have them become float. If working in a space smaller then the actual pixel size of the screen, one might want to pass float values instead. Even if working solely with int, it seems java is not partial to an argument being cast as (int) when it requires (float) so it seems like a win-win

Original issue: http://code.google.com/p/libgdx/issues/detail?id=9

@badlogic
Copy link
Member Author

From badlogicgames on June 17, 2010 01:59:31

Will change in the next release (this weekend probably). Spritebatch was originally designed to be used with integer viewports. Given that box2d has a different worldscale i might as well change this. Note however that text will be all fucked up when drawn at none integer positions. So don't complain afterwards :)

Status: Accepted

@badlogic
Copy link
Member Author

From badlogicgames on June 17, 2010 04:10:14

Owner: badlogicgames

@badlogic
Copy link
Member Author

From badlogicgames on June 18, 2010 05:10:26

Fixed in SVN. positions can now be passed in as floats.

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant