The getSimpleX/YSize methods print 0 0.
The getOrigFileX/YSize methods print
for X and
for the Y method. Why does it return two values and why does it not return a list which can be easily accessed via value[i]?
While 624x264 is the correct size in pixels … where do the 960x540 come from? My screen size is 1920x1200, so that can’t be it. Thing is that might be the size of the parent node. But I request those values long before reparenting the node. The code above is the full snippet.
getOrigFileXSize() and getOrigFileYSize() return one number each. You must be mistaken about the double numbers–maybe you’re seeing the output from two different textures.
Note that getSimpleXSize()/getSimpleYSize() have nothing whatsoever to do with the size of the texture and will generally always return 0, unless you set a “simple” texture image. The “simple” texture image is an advanced feature which is designed to speed texture loads: you can specify a highly-reduced version of the texture as the “simple” texture which will be displayed until the full texture is loaded from disk. It’s only useful if you’re using threaded texture loads to load assets in the background, which is another advanced feature.
I never came upon this method before, it’s the only part of my game where I use it. If I only print either X or Y, two values are printed on the console, seperated by a new line (I guess from appearance). The 624/264 thing is the texture size, but 960/540 is also printed. It’s not the size of the parent frame (as I thought, because it would fit) - if I change that, 960/540 is still reported. I assume that there’s a little bug(?) here that fetches values from the frame that the image is embedded in, either from the frameSize, image_pos or image_scale attribute of DirectFrame. It would fit because it has a 16:9 ratio and I use calculations like xright*0.8/480 setting up the DirectFrame. Maybe it’s even platform-specific.
On the other hand all that can’t be because I request the getOrigFileXSize method right after loading the image, before defining the embedding DirectFrame.