-
-
Notifications
You must be signed in to change notification settings - Fork 19
OSL ‐ Canvas System
DanimalsTCGYT edited this page Aug 4, 2024
·
3 revisions
An osl canvas is an image held in memory that can be modified quickly and easily by osl.
This is to allow for fast drawing apps and other applications that would not be possible otherwise
canv "create" id width height #colour
// creates a new canvas (used for rendering)
// much faster than the uri commands
canv "remove" id
// deletes the canvas
canv "expand" id width height #colour
// resizes the image with #colour filling in the added parts
canv "stretch" id width height
// stretches the canvas
log id.canvWidth()
log id.canvHeight()
// log the width and height of the canvas with this specific id
log id.canvPixels()
// log the number of pixels in the canvas
log id.canvData()
// log the data uri of the canvas
canv "set_pixel" id index #colour
// update the canvas pixel at index in "id" to #colour
log id.canvPixel(index)
// log the colour of the pixel at a specific index
originOS is a web desktop gui with a self contained file system, programming languages, internet system and a whole lot of stuff an os should be able to do Use originOS here