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
save_screenshot(3) Arcan Lua API save_screenshot(3)

save_screenshot - Store a copy of the current display to a file.

nil
save_screenshot( dstres, fmt, srcid, local )

This function creates a file of the latest drawn output on the primary display or of the contents of a specific VID of specified in srcid . Local (default, false) set to true or non-zero hints that the local storage should be used. This is important when there is a discrepancy between what is stored as the objects video backing store (implementation defined) and the local copy as they are not always in synch. The format setting is by default FORMAT_PNG but can also be FORMAT_PNG_FLIP , FORMAT_RAW 8, FORMAT_RAW 24 or FORMAT_RAW 32 though the RAW formats are primarily for advanced use and debugging purposes.

1
For specific contexts, primarly calctargets, the contents of the non-local storage is not accessible on all graphic subsystems for all srcids as the calctarget may occupy or bind the same slot. Either do the call outside such a scope or force local readback.

function save_screenshot0()
      show_image(fill_surface(64, 64, 255, 0, 0));
      local a = fill_surface(64, 64, 0, 255, 0);
      move_image(a, VRESW - 64, 0);
      local b = fill_surface(64, 64, 0, 0, 255);
      move_image(b, 0, VRESH - 64);
      local c = fill_surface(64, 64, 0, 255, 255);
      move_image(c, VRESW - 64, VRESH - 64);
      show_image({a, b, c});
end
June 2022 resource

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.