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

FreeBSD Manual Pages

  
 
  

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

NAME
     relink_image - Reassign and translate the property-space to be relative an-
     other object

SYNOPSIS
     nil
     relink_image( vid:id, vid:newparent )
     relink_image( vid:id, vid:newparent, int:panchor )
     relink_image( vid:id, vid:newparent, int:panchor, int:anchor_opt )

DESCRIPTION
     This function is a specialized variant of link_image , please read the doc-
     umentation  for  that function for a full description of the arguments. The
     difference between the two is that this one preserves the relative resolved
     world-space position between id  and newparent . With link_image , if  id
     is  at  100,100 and newparent  is at 100,100 the post-link world coordinate
     of id  will be 200,200. With relink_image	the post-link  world  coordinate
     will be 100,100 and its local properties will put it at 0,0. This is rougly
     equivalent  to resolving id  and newparent  before linking, calculating the
     relative position difference and moving the object to the new position.

EXAMPLE
     function relink_image0()
	   a = fill_surface(64, 64, 255, 0, 0);
	   b = fill_surface(32, 32, 0, 255, 0);
	   move_image(a, 100, 100)
	   move_image(b, 110, 110)
	   relink_image(b, a);
	   show_image(b);
	   blend_image(a, 1.0, 50);
	   move_image(a, VRESW, VRESH, 100);
	   rotate_image(a, 100, 100);
	   expire_image(a, 100);
     end

image				   August 2026			 relink_image(3)

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

home | help