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

Accessors to current frame width and height #13

Closed
alesegdia opened this issue Oct 31, 2015 · 2 comments
Closed

Accessors to current frame width and height #13

alesegdia opened this issue Oct 31, 2015 · 2 comments

Comments

@alesegdia
Copy link

Like anim:getWidth() and anim:getHeight(), or maybe more explicit like anim:getCurrentFrameWidth(). What do you think about this?

@kikito kikito closed this as completed in 3f7607f Nov 21, 2015
@kikito
Copy link
Owner

kikito commented Nov 21, 2015

Hi! Sorry it took me a while to answer this.

I have released a new version of anim8 which includes a new method, anim:getDimensions(). It returns both the width and height of the current frame in a single call, so the usage is like this:

local w,h = anim:getDimensions()

Appart from this, it is very similar to your recommendation. Thanks a lot!

@alesegdia
Copy link
Author

Nice. Thanks!

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

No branches or pull requests

2 participants