Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
image_hit(3)			  Arcan Lua API 		    image_hit(3)

NAME
     image_hit	-  Test if the visible region of a specific object covers a spe-
     cific point in screen space.

SYNOPSIS
     true or false
     image_hit( vid, x, y )

DESCRIPTION
NOTES
     1	    This function works by applying the active transform of the bounding
	    volume and then projects using the currently active  output  projec-
	    tion and finally performs a point-in-polygon test for the two trian-
	    gles.  This is performed even for simpler cases (e.g. non-hierarchi-
	    cal translations etc.).

EXAMPLE
     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)

image				   August 2026			    image_hit(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=image_hit&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help