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

FreeBSD Manual Pages

  
 
  

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

NAME
     link_image - Reassign the property-space to be relative another object

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

DESCRIPTION
     By  default,  all objects defines their properties relative to an invisible
     WORLDID  object. By the use of this function, this object can  be	switched
     to another dynamically, allowing you to build complex hierarchies.

     The  default properties that are relative to another object in this way are
     opacity, position, orientation and lifetime, though this set can be changed
     with the use of image_mask_set , image_mask_clear ,  image_mask_clearall  ,
     image_mask_toggle

     The  vid	 argument refers to the object that shall be reassigned, and the
     newparent	arguments specified the object that it should be  made	relative
     to.

     If  the panchor  argument is specified, it defines the positional anchoring
     space in the parent based on one of the following values:

     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,  ANCHOR_LR    :
     lower-right.

     This is relative to the anchor origo (default, ANCHOR_UL ) of id  which can
     be changed with image_origo_offset .

     If  the  anchor_opt   argument is specified, further anchor behavior can be
     controlled. The valid values for anchor_opt  now  are:  ANCHOR_SCALE_NONE
     (default),  ANCHOR_SCALE_W , ANCHOR_SCALE_H , ANCHOR_SCALE_WH  - the object
     size is now defined relative to that of the width and/or height of the par-
     ent. The relative delta is calculated based on the current scale versus the
     initial (surface without a texture backing) or the current storage size.

NOTES
     1	    Changing link ownership resets all scheduled transformations  except
	    for blending.

     2	    Rotation transforms do not take the positional anchor point into ac-
	    count, only its mask and origo offset.

     3	    Link to self is equivalent to linking back to WORLDID .

     4	    linked  scale means that 1px will be subtracted from id  in each de-
	    sired dimension when calculating final size as no object can go  be-
	    low 1x1 px size, making it otherwise impossible to describe the case
	    where parent and child should have identical size for the shared di-
	    mension.  hare dimensions

EXAMPLE
     function link_image0()
	   a = fill_surface(64, 64, 255, 0, 0);
	   b = fill_surface(32, 32, 0, 255, 0);
	   link_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			   link_image(3)

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

home | help