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

Texture Packer polygon packing results in image sizes rendering 2x the size when @2x pixel ratio #325

Closed
mnordine opened this issue Oct 22, 2019 · 3 comments

Comments

@mnordine
Copy link
Contributor

mnordine commented Oct 22, 2019

The images on stage look roughly double the size, and are offset on x and y axis (to the right and down)

@1x works fine.

@bp74
Copy link
Owner

bp74 commented Oct 23, 2019

Hi, there is an example for HiDPI images:
https://github.com/bp74/StageXL_Samples/tree/master/example/basic/bitmap_data_hidpi

you have to load the @1x images in your application, and the runtime will automatically load the @2x images as needed.

You can also specify the available pixel ratios for the HiDPI images:
StageXL.bitmapDataLoadOptions.pixelRatios = [1.00, 1.25, 1.50, 2.00, 3.00];

@mnordine
Copy link
Contributor Author

Yeah, in that example, you've used MaxRects algorithm. Test that baby out at @2x with Polygon algo.

@mnordine
Copy link
Contributor Author

mnordine commented Nov 7, 2019

@bp74 Were you able to reproduce with Polygon @2x?

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

3 participants