my patch displays randomly selected images that vary in size and aspect ratio. until now, i haven’t found a proper way to calculate suitable values needed to transform either thru the aspect ratio node nor transform(2d). i could work with a list of fixed values, but that’s a lame and unflexible way to go. i’m sure this is a known task, any hints on how to solve this?
hi partick, attached there is a patch that does what m4d explains. I divide the width and the height of the texture, so i obtain the aspect ratio. Multiplying the width to this value you have the correct proportions. Then i used a aspect ratio in the renderer so the aspect ratio of the contens is always the same of the aspectratio of the window.
thanks m4d and thanks screamer for solving this last puzzle fragment faster than expected! i’d to ask for what screamer explained anyway now, that’s done too.
assuming that it’s a common task to deal with varying aspect ratios, this would be a worthwhile addition to the wiki.