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:alpha )

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, including the
     one hidden behind WORLDID	has a clear color which is  the  default  'back-
     ground'  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 ter-
	    minal 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				   August 2026			  image_color(3)

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

home | help