I’m trying to map a DirectGui object’s coordinates to window/form coordinates ([0,0] upper left, [width, height] lower right). I assume that calling the object’s getPos method gives me its coordinates with respect to aspect2d?
aspect2d contains coordinates scaled by the aspect ratio, so you wont get [-1, 1] ranges except for square windows.
getPos returns the position relative to the parent, whether aspect2d, render2d or something else, so the scale of the parent is taken in regard as well.
Use getPos(aspect2d) to get them relative to aspect2d, or getPos(render2d) to get them in -1, 1 range.
Also consider getBounds and getRelativePoint to map the corners of the things to render2d’s coordinate system.