It's simple, I expected texture width as closest larger power of 2 value of image width and height.
Instead it returns ratio, this is from init where it is set:
Code:
protected final void init() {
if (inited) {
return;
}
inited = true;
if (texture != null) {
width = texture.getImageWidth();
height = texture.getImageHeight();
textureOffsetX = 0;
textureOffsetY = 0;
textureWidth = texture.getWidth(); // WRONG, its' texture.getTextureWidth();
textureHeight = texture.getHeight(); // WRONG, it's texture.getTextureHeight();
}
initImpl();
centerX = width / 2;
centerY = height / 2;
}
So either above code in Image is incorrect or getWidth() and getHeight() from TextureImpl class:
Code:
public float getWidth() {
return widthRatio;
}