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 de- fault output display (which, in turn, is controlled by the command-line arguments) in a 1:1 ratio. For multiple-screen configurations or situations where you want higher rendering resolution than the default display, the canvas can be re- sized. NOTES 1 This will affect any accelerated- mouse cursor as well, where size and projection will be related to the ratio between the canvas dimensions and those of the actual main output display, use resize_cursor if this behavior is an issue. 2 The global canvas size constants VRESW , VRESH will be changed accordingly. 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 values. 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 sur- faces can be and in such cases, the resize operation will fail silently. The other is that this can be used to circumvent tex- ture size restrictions through creative use of extpop/extpush contexts and image_sharestorage. 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 April 2025 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+14.3.quarterly>