GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
resize_video_canvas(3) Arcan Lua API resize_video_canvas(3)

resize_video_canvas - Resize the virtual canvas drawing area

nil
resize_video_canvas( neww, newh )

By default, the drawing canvas is set to match the video platform default 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 resized.

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 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_sharestorage. If this is an issue, dimension restrictions should be added in this function as well.

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

function resize_video_canvas0()
      resize_video_canvas(1024 * 1024 * 1024, 0);
end

function resize_video_canvas1()
      resize_video_canvas(-1, -1);
end

video_displaymodes(3) map_video_display(3)

June 2022 vidsys

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.