FreeBSD Manual Pages
fill_surface(3) Arcan Lua API fill_surface(3) NAME fill_surface - Allocate a new video object and fill with a single colour. SYNOPSIS vid fill_surface( objw, objh, r, g, b, storew, storeh ) DESCRIPTION fill_surface act as a memory allocation function in the sense that it creates a fully qualified video object, including texture store, and is identical in capability to an image acquired from other sources, e.g. load_image, but particularly useful for rendertargets, recordtargets and similar functions that operate on an intermediate storage. Current width/height and initial width/height will be set to objw and objh . The range for r, g, b are unsigned 8-bit (0..255) and the optional storew and storeh arguments define the actual storage dimensions. NOTES 1 storew and storeh are subject to the limit of MAX_SURFACEW and MAX_SURFACEH , these are compile-time constants and attempting to exceed these values is a terminal state transition. 2 objw and objh are expected to be > 0, setting these to an in- valid value, i.e. <= 0 is a terminal state transition. EXAMPLE function fill_surface0() a = fill_surface(32, 32, 255, 0, 0, 32, 64); b = fill_surface( 1, 1, 0, 0, 0); c = fill_surface( 1, 1, 0, 0, 0, 32); end MISUSE function fill_surface0() a = fill_surface(-1, 32, 255, 0, 0); end MISUSE function fill_surface1() a = fill_surface(32, 32, 0, 0, 0, 65535, 65535); end SEE ALSO: null_surface(3) raw_surface(3) color_surface(3) image April 2025 fill_surface(3)
NAME | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLE | MISUSE | MISUSE | SEE ALSO:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=fill_surface&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>