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

FreeBSD Manual Pages

  
 
  

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

NAME
       image_color - Change color_surface and rendertarget clear-color

SYNOPSIS
       true or false
       image_color( vid:dst, number:red, number:green, number:blue )
       image_color( vid:dst, number:red, number:green, number:blue, number:al-
       pha )

DESCRIPTION
       There are two uses for this function. The first is that it can be  used
       to  update  the	current	 color that a color_surface  uses as the color
       value passed to the shader. The second is that each  rendertarget,  in-
       cluding	the  one hidden	behind WORLDID	has a clear color which	is the
       default 'background' color. This	initialises to 25, 25, 25, (255) which
       is a dark grey value, but can be	updated	via the	use of this function.

NOTES
       1      trying  to set this on a non-rendertarget, textured surface is a
	      terminal state transition.

EXAMPLE
       function	image_color0()
	     local a = color_surface(64, 64, 255, 0, 0);
	     show_image(a);
	     image_color(a, 0, 255, 0);
       end

EXAMPLE
       function	image_color1()
	     image_color(WORLDID, 255, 0, 0, 0);
       end

MISUSE
       function	image_color0()
	     image_color(BADID);
       end

MISUSE
       function	image_color1()
	     local img = fill_surface(64, 64, 0, 0, 0);
	     image_color(img, 255, 0, 0, 0);
       end

SEE ALSO:
       color_surface(3)	define_rendertarget(3)

image				  April	2022			image_color(3)

NAME | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLE | EXAMPLE | MISUSE | MISUSE | SEE ALSO:

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=image_color&sektion=3&manpath=FreeBSD+13.1-RELEASE+and+Ports>

home | help