StageXL icon indicating copy to clipboard operation
StageXL copied to clipboard

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

Open mnordine opened this issue 6 years ago • 3 comments

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.

mnordine avatar Oct 22 '19 00:10 mnordine

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];

bp74 avatar Oct 23 '19 19:10 bp74

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

mnordine avatar Oct 23 '19 21:10 mnordine

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

mnordine avatar Nov 07 '19 13:11 mnordine