Follow

graphics, kotlin 

Dabbling in graphics with libktx (a interface to libgdx), and I guess I don't understand the coordinate system yet.

The text and the red box (and the lower-left corner of the black outline) all have their x, y as 100, 100

which makes sense if 0, 0 is lower-left and positive-x is right and positive-y is up

yet a box drawn from there goes above, but the text goes below?

mostly below, that is, because part of it ascends above the y=100 line?

graphics, kotlin 

Digging through several layers of libgdx reference documentation, we find libgdx.badlogicgames.com/ci/ni

That does indeed document the `y` parameter as "y position for the top of most capital letters in the font."

which ... what? How is one supposed to avoid clipping if the positioning is based on where the top of "most" things are?

Show thread
Sign in to participate in the conversation
Toot.Cat

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!