image_screen_coordinates(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’– NAME πŸ’–

okay so bestie, this is image_screen_coordinates(3) from the Arcan Lua API manual β€” the little lookup that tells you the screen space coordinates for the specified object. It's giving "where is this thing on screen" energy, and honestly? iconic. ✨

🌸 SYNOPSIS 🌸

x1,y1,x2,y2,x3,y3,x4,y4
image_screen_coordinates( vid )

πŸ¦‹ DESCRIPTION πŸ¦‹

So image_screen_coordinates( vid ) resolves the screen space coordinates of the four corners of the specified vid. It takes position, scale and rotation transform into account β€” yes, all of it, not just the raw position. The way it handles the whole transform? obsessed. πŸ’…

You get eight values back, in this exact order: x1,y1,x2,y2,x3,y3,x4,y4. Slay. πŸ‘‘

πŸŽ€ NOTES πŸŽ€

  1. This does not include any vertex- stage transformations that may be applied by a non-standard shader. So if a shader is doing extra main-character stuff at the vertex stage, that is not part of this lookup. No cap. πŸ™ˆ

✨ EXAMPLE ✨

Here's the example, literally ready to run:

function image_screen_coordinates0()
      a = fill_surface(64, 64, 255, 0, 0);
      show_image(a);
      move_image(a, 32, 32);
      rotate_image(a, 145);
      print( image_screen_coordinates(a) );
end

kisses and bye bestie β€” this page is from the image source/version, dated October 2026. πŸ«ΆπŸ’–

πŸ“¦ where this page comes from