Posted 14 February 2017 - 11:29 PM
Surface 2 is the successor to the popular Surface API.
It's been remade completely with an emphasis on flexibility, stability and multi-framework support.
Some features include:
You can simply load the library using
Getting started
Surface 2 has extensive documentation and examples to get you started.
An example:
If you have any questions or suggestions, leave a reply.
All feedback is appreciated :D/>
It's been remade completely with an emphasis on flexibility, stability and multi-framework support.
Some features include:
- ComputerCraft, OpenComputers, Love2D, Redirection Arcade and Riko 4 support
- RGB and multiple palette support
- NFT, NFP, BMP and RIF image saving and loading
- Scaling, rotation, flipping
- Per-layer transparency
- Stencil stacks (nested clipping regions)
- Lots of shapes
- Sprite maps
- Pixel fonts and text drawing
pastebin get UxweEuqf surface
You can simply load the library using
local surface = dofile("surface")
Getting started
Surface 2 has extensive documentation and examples to get you started.
An example:
-- Loads Surface 2.
local surface = dofile("surface")
-- Loads the color.bmp image.
local surf = surface.load("home/color.bmp")
-- Converts the colours from RGB to CC, with dithering.
surf:toPalette(surface.palette.cc, true)
-- Creates the screen surface.
local screen = surface.create(57, 19)
-- Draws the image surface with smaller pixels.
screen:drawSurfaceSmall(surf, 0, 0)
-- Outputs the screen surface.
screen:output()
-- Waits for a mouse click.
os.pullEvent("mouse_click")
Produces this:If you have any questions or suggestions, leave a reply.
All feedback is appreciated :D/>
Edited on 15 February 2017 - 09:19 PM