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

FreeBSD Manual Pages

  
 
  

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

NAME
     center_image - move a video object relative to an external reference object

SYNOPSIS
     nil
     center_image( vid:src, vid:ref )
     center_image( vid:src, vid:ref, int:anchor )
     center_image( vid:src, vid:ref, int:anchor, int x_ofs )
     center_image( vid:src, vid:ref, int:anchor, int x_ofs, y_ofs )

DESCRIPTION
     This  positions  the  center of src  relative to the center anchor point on
     ref . The anchor point can be changed by specifying the anchor   object  to
     one  of:  ANCHOR_UL   : upper-left, ANCHOR_CR  : upper-center, ANCHOR_UR  :
     upper-right, ANCHOR_CL  : center-left, ANCHOR_C  :  center,  ANCHOR_CR    :
     center-right,  ANCHOR_LL	 :  lower-left, ANCHOR - LC  : lower-center, AN-
     CHOR_LR  : lower-right. The final position can also be shifted by	specify-
     ing  x_ofs  (px) and y_ofs . This is a one-time alignment and resolves src
     and ref  into world-space when calculating the final coordinates. For auto-
     matic response to changes in ref , use the link_image  function.

EXAMPLE
     function center_image0()
	   local a = fill_surface(64, 32, 255, 0, 0);
	   local b = fill_surface(127, 127, 0, 255, 0);
	   show_image({a, b});
	   center_image(a, b);
     end

SEE ALSO:
     link_image(3)

image				   August 2026			 center_image(3)

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

home | help