Open NascentTech opened 3 years ago
When using add_image the preserve_aspect_ratio flag is not applying correctly unless used in a very specific manner.
When using the following the aspect is not preserved and the image is stretched to the specified dimensions.
local test = fe.add_image( "test.png", x, y, w, h ); test.preserve_aspect_ratio = true;
However, if the file is specified after the flag is set, then the aspect is correctly preserved.
local test = fe.add_image( "test.png", x, y, w, h ); test.preserve_aspect_ratio = true; test.file_name = "test.png";
To further complicate things, I found that using a magic token causes it to work correctly again. The following will work as expected.
local test = fe.add_image( "[DisplayName]", x, y, w, h ); test.preserve_aspect_ratio = true;
I have not found any such issues with add_artwork or FadeArt. This only appears to affect add_image. Tested with 2.6.1 and nightly builds
When using add_image the preserve_aspect_ratio flag is not applying correctly unless used in a very specific manner.
When using the following the aspect is not preserved and the image is stretched to the specified dimensions.
However, if the file is specified after the flag is set, then the aspect is correctly preserved.
To further complicate things, I found that using a magic token causes it to work correctly again. The following will work as expected.
I have not found any such issues with add_artwork or FadeArt. This only appears to affect add_image. Tested with 2.6.1 and nightly builds