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

FreeBSD Manual Pages

  
 
  

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

NAME
     blend_image - Change image opacity.

SYNOPSIS
     nil
     blend_image( VID or VIDtbl, opacity, time, interp )

DESCRIPTION
     Changes  the  opacity of the selected VID s either immediately (default) or
     by setting an optional time  argument to a non-negative integer. This func-
     tion either accepts single VID s or a group of VID s in a table  (iteration
     will  follow  the	behavior of pairs() Interp can be set to one of the con-
     stants ( INTERP_LINEAR , INTERP_SINE , INTERP_EXPIN , INTERP_EXPOUT  ,  IN-
     TERP_EXPINOUT , INTERP_SMOOTHSTEP ).

NOTES
     1

	    VID s with an opacity other than 0.0 (hidden) and 1.0 (opaque, visi-
	    ble) will be blended.

     2	    Values outside the allowed range will be clamped.

     3	    The blend behavior is dictated by the default global blendfunc value
	    (src_alpha,  1-src_alpha)  and  can  be  overridden  with  force_im-
	    age_blend(mode)

EXAMPLE
     function blend_image0()
	   a = fill_surface(128, 128, 255, 0, 0);
	   b = fill_surface(128, 128, 0, 255, 0);
	   move_image(b, 64, 64);
	   show_image({a,b});
	   blend_image(b, 0.5, 100);
     end

MISUSE
     function blend_image0()
	   a = fill_surface(128, 128, 255, 0, 0);
	   b = fill_surface(128, 128, 0, 255, 0);
	   move_image(b, 64, 64);
	   show_image({a,b});
	   blend_image(b, -0.5, -100);
     end

MISUSE
     function blend_image1()
	   a = fill_surface(128, 128, 255, 0, 0);
	   b = fill_surface(128, 128, 0, 255, 0);
	   move_image(b, 64, 64);
	   show_image({a,b});
	   blend_image("a", 0.5, 100);
     end

MISUSE
     function blend_image2()
	   a = fill_surface(128, 128, 255, 0, 0);
	   b = fill_surface(128, 128, 0, 255, 0);
	   move_image(b, 64, 64);
	   show_image({a,b});
	   blend_image({-1, "a", true, 5.0}, true, "error");
     end

SEE ALSO:
     image_force_blend(3)

image				   August 2026			  blend_image(3)

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

home | help