resize_video_canvas(3)
β¨ resize_video_canvas β¨
okay so bestie, welcome to the Arcan Lua API π
this is resize_video_canvas(3) and it's literally the glow-up button for your drawing canvas, no cap.
π NAME π
resize_video_canvas β resize the virtual canvas drawing area πΌοΈβ¨
π¦ SYNOPSIS π¦
nil
resize_video_canvas( neww, newh )
πΈ DESCRIPTION πΈ
so by default? the drawing canvas is set to match the video platform's default output display β which, btw, is itself controlled by the command-line arguments β in a 1:1 ratio. matching, aligned, cute, done. π«Ά
but likeβ¦ what if you're running multiple-screen configurations? or you just want a higher rendering resolution than the default display gives you? that's the whole vibe check this function passes: the canvas can be resized. go bigger, go smaller, live your truth. π₯
π NOTES π
- this will affect any accelerated- mouse cursor as well π β its size and projection are related to the ratio between the canvas dimensions and those of the actual main output display. if that behavior is an issue, use
resize_cursorinstead. it's giving "one thing changes, everything follows." - the global canvas size constants
VRESW,VRESHwill be changed accordingly. so yeah, the constants are in on it too. π - if the canvas has previously been destroyed via
delete_image(WORLID)this function will restore/reallocate it. undead canvas energy honestly π§ββοΈβ¨ - okay so there are two major caveats with setting this property to large values, and we need to talk:
- one: the canvas is used as a primary rendering target that is then mapped to one or several output displays. but there are, however, hardware limitations on how large such surfaces can be β and in such cases, the resize operation will fail silently. π not a single word of complaint. just nothing.
- two: this can be used to circumvent texture size restrictions through creative use of
extpop/extpushcontexts andimage_sharestorage. if this is an issue, dimension restrictions should be added in this function as well. so like, if that's a problem for you, that's on your function. π
π 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
look at her go π iconic behavior fr fr
π MISUSE π
do NOT do this, bestie:
function resize_video_canvas0()
resize_video_canvas(1024 * 1024 * 1024, 0);
end
π MISUSE π
and absolutely do NOT do this either:
function resize_video_canvas1()
resize_video_canvas(-1, -1);
end
i'm literally begging you π«Ά
π SEE ALSO π
and that's the whole page, bestie π written by vidsys, dated October 2026 β go forth and resize responsibly, ilysm πβ¨
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms