image_hit(3)
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 π
- 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
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms