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

Made rectangle parameter optional & automatically calculate width/height. #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xLite
Copy link

@xLite xLite commented Jan 20, 2013

You check to see if rectangle is null in getRectangle() so I'm guessing you forgot to set the parameter's default value to null. Fixed.

Also added the feature to make it so that, after packing, you can access special width and height getters that retrieve the smallest possible values in order to house every single rectangle. Useful if you need to know what size to set a texture/RenderTexture object in Starling.

xLite and others added 4 commits January 20, 2013 16:35
You check to see if rectangle is null in the function so I'm guessing you forgot to set the parameter's default value to null. Fixed.
Removes the need to manually specify the width and height. Simply set the absolute maximum width and height (like 2048x2048 if you're working with a Stage3D texture) and the class will automatically calculate the smallest possible width and height after packing. Accessible via the `width` and `height` getters.
@mekteck15678
Copy link

``

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

Successfully merging this pull request may close these issues.

None yet

2 participants