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

FreeBSD Manual Pages

  
 
  

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

NAME
     image_clip_on - Control clipping for a video object.

SYNOPSIS
     nil
     image_clip_on( vid:image )
     image_clip_on( vid:image, int:mode )
     image_clip_on( vid:image, int:mode=CLIP_SHALLOW, vid:cliptgt )

DESCRIPTION
     This  changes  the clipping mode for the video object referenced by image .
     By default the mode is CLIP_ON , which is the more expensive one. It uses a
     stencil buffer to draw the entire hierarchy built using link_image . It  is
     thus  useful for complex hierarchies with possibly rotated objects. Another
     option is CLIP_SHALLOW . This only uses the immediate parent, and will  get
     a fast-path assuming that both objects are rotated as that can be solved by
     adjusting	object size and texture coordinates alone. If a cliptgt  is pro-
     vided with the CLIP_SHALLOW  clipping mode, a specific object will be  used
     for calculating the clipping bounds rather than using the link_image  spec-
     ified  one.  This	is useful when a transform hierarchy is needed, but with
     specific clipping anchors.

NOTES
     1	    If a clip target is set to a non-existing or otherwise bad object or
	    becomes invalid through deletion, clipping will revert to the  image
	    parent as if no clip target had been specified.

EXAMPLE
     function image_clip_on0()
	   a = fill_surface(64, 64, 255, 0, 0);
	   b = fill_surface(64, 64, 0, 255, 0);
	   link_image(b, a);
	   move_image(b, 32, 32);
	   show_image({a,b});
	   image_clip_on(b, CLIP_SHALLOW);
     end

MISUSE
     function image_clip_on0()
	   image_clip_on(BADID);
     end

SEE ALSO:
     image_clip_off(3)

image				   August 2026			image_clip_on(3)

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

home | help