Skip to content

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

Open
xLite wants to merge 4 commits intovillekoskelaorg:masterfrom
xLite:patch-1
Open

Made rectangle parameter optional & automatically calculate width/height.#1
xLite wants to merge 4 commits intovillekoskelaorg:masterfrom
xLite:patch-1

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.

2 participants