summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2021-03-05 17:09:39 -0600
committercheapie <no-email-for-you@example.com>2021-03-05 17:09:39 -0600
commit4a3c741fb304fc70098649906cbc55af313abc67 (patch)
treec7a90ba13481bea3df5310c91960ba878c6f644d /docs
parent7446451b1b022ee440ebe3932fa79c04fc6d6ac9 (diff)
downloaddigistuff-4a3c741fb304fc70098649906cbc55af313abc67.tar
digistuff-4a3c741fb304fc70098649906cbc55af313abc67.tar.gz
digistuff-4a3c741fb304fc70098649906cbc55af313abc67.tar.bz2
digistuff-4a3c741fb304fc70098649906cbc55af313abc67.tar.xz
digistuff-4a3c741fb304fc70098649906cbc55af313abc67.zip
Add "sendpacked" and "loadpacked" commands to GPU
These allow converting images to/from string representations that are much easier and faster for Luacontrollers to store and handle.
Diffstat (limited to 'docs')
-rw-r--r--docs/gpu.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/gpu.txt b/docs/gpu.txt
index a2ea3c7..80c8852 100644
--- a/docs/gpu.txt
+++ b/docs/gpu.txt
@@ -147,3 +147,26 @@ y1 [integer 1-64]: The Y position of the start of the line.
y2 [integer 1-64]: The Y position of the end of the line.
color [hex color, default "000000"]: The nominal color of the line (may not be the color of every pixel, see the "antialias" setting)
antialias [boolean, default false]: Whether to apply a (very) crude smoothing algorithm to the line to reduce jagged edges at the expense of making the line slightly blurry.
+
+Command: sendpacked
+-------------------
+
+Converts the image in a buffer into a string representation that can be loaded again later with the "loadpacked" command.
+The result uses 4 bytes per pixel and consists entirely of printable characters (A-Z, a-z, 0-9, +, and /).
+
+Parameters:
+buffer [integer 0-7]: The buffer to convert.
+channel [string]: The digilines channel to send the packed image on.
+
+Command: loadpacked
+-------------------
+
+Load a string representation of an image (created by the "sendpacked" command) back into a buffer.
+
+Parameters:
+buffer [integer 0-7]: The buffer to load the image into.
+x [integer 1-64]: The X position of the left side of the image.
+y [integer 1-64]: The Y position of the top of the image.
+xsize [integer 1-64]: The width of the image. Must be the same as the original image or the image will be severely distorted.
+ysize [integer 1-64]: The height of the image. Should be the same as the original image.
+data [string]: The packed image to load.