FreeBSD Manual Pages
resize_video_canvas(3) Arcan Lua API resize_video_canvas(3) NAME resize_video_canvas - Resize the virtual canvas drawing area SYNOPSIS nil resize_video_canvas( neww, newh ) DESCRIPTION By default, the drawing canvas is set to match the video platform default output display (which, in turn, is controlled by the command-line argu- ments) in a 1:1 ratio. For multiple-screen configurations or situations where you want higher ren- dering resolution than the default display, the canvas can be resized. NOTES 1 This will affect any accelerated- mouse cursor as well, where size and projection will be related to the ratio between the canvas di- mensions and those of the actual main output display, use re- size_cursor if this behavior is an issue. 2 The global canvas size constants VRESW , VRESH will be changed ac- cordingly. 3 If the canvas has previously been destroyed via delete_image( WORLID ) this function will restore/reallocate it. 4 There are two major caveats with setting this property to large val- ues. One is that the canvas is used as a primary rendering target that is then mapped to one or several output displays. There are, however, hardware limitations on how large such surfaces can be and in such cases, the resize operation will fail silently. The other is that this can be used to circumvent texture size restrictions through creative use of extpop/extpush contexts and image_sharestor- age. If this is an issue, dimension restrictions should be added in this function as well. EXAMPLE function resize_video_canvas0() local img_1 = fill_surface(VRESW, VRESH, 255, 0, 0); local img_2 = fill_surface(100, 100, 0, 255, 0); move_image(img_2, VRESW * 2, VRESH * 2, 400); show_image({img_11, img_2}); resize_video_canvas(VRESW * 4, VRESH * 4); end MISUSE function resize_video_canvas0() resize_video_canvas(1024 * 1024 * 1024, 0); end MISUSE function resize_video_canvas1() resize_video_canvas(-1, -1); end SEE ALSO: video_displaymodes(3) map_video_display(3) vidsys August 2026 resize_video_canvas(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=resize_video_canvas&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
