Hey everybody,
With thanks to toga for discovering a flaw in my module, I have corrected it so that the progressRing works as expected in all circumstances, including when content is being scaled (letterbox, zoomEven, zoomStretch), and if the progressRing is wider than the device’s screen width or height. You can download the corrected module here, and I’ve also updated the sample project available here. I’ve also updated the post above to include the corrected code.
Here’s what was happening: the progressRing utilizes a mask image to create the circular shape and “donut hole.” The mask image is procedurally generated, but previously it was not necessarily meeting the strict requirements for a mask image (height/width must be divisible by 4, and must have a 3-pixel black border on all sides) if the device’s width and height did not match the content width/height defined in your project’s config.lua. I’ve fixed this by making the mask file a fixed size that is not determined by the progressRing’s radius, but rather by the device’s screen size. Then the image mask is scaled appropriately to match up with the progressRing’s defined radius.
Thanks again toga for finding this flaw, and enjoy everybody!
