image_hit(3)

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

okay bestie, this is image_hit(3) from the Arcan Lua API β€” yes, the manual page, and it's literally about testing if a point in screen space is covered. πŸ’–βœ¨ No cap, we're keeping every detail.

🌸 NAME 🌸

image_hit β€” test if the visible region of a specific object covers a specific point in screen space. That's the whole mission, bestie. πŸ«ΆπŸ’…

πŸ“œ SYNOPSIS πŸ“œ

true or false
image_hit( vid, x, y )

So it hands you back true or false, and you call it with vid, x, and y. iconic. πŸ‘‘βœ¨

🫧 DESCRIPTION 🫧

okay so the original DESCRIPTION section is literally empty β€” no content here, bestie. The actual tea is in NOTES. πŸ“

πŸ“ NOTES πŸ“

  1. This function works by applying the active transform of the bounding volume, then projecting using the currently active output projection, and finally performing a point-in-polygon test for the two triangles. This is performed even for simpler cases (e.g. non-hierarchical translations etc.). πŸ’…βœ¨

πŸ§ͺ EXAMPLE πŸ§ͺ

here's the example, copied exactly because code is sacred, bestie: πŸŽ€

       function image_hit0()
             a = fill_surface(32, 32, 0, 255, 0);
             rotate_image(a, 45);
             show_image(a);
             if (image_hit(a, 0, 0) == false and
                   image_hit(a, 16, 16) == true) then
                   print("OK");
             else
                   print("Fail");
             end
       end

πŸ‘€ SEE ALSO: πŸ‘€

  • pick_items(3) β€” go check that one out too, bestie. πŸ¦‹

later, bestie! this page is from source image, dated October 2026, and it's the image_hit(3) manual. πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from