Module Pictures
#include <macaw.h>
Functions
- newpicture
- Makes a new, empty picture that you can draw into or draw from.
- loadpicture
- Loads a picture from a file: a
.pxl saved by Paint, or a .png. - freepicture
- Lets go of a picture you've finished with.
- picturewidth
- Tells you how wide a picture is.
- pictureheight
- Tells you how tall a picture is.
- drawpicture
- Draws a whole picture into the window, or into the picture you're drawing into.
- drawpart
- Draws one rectangle of a picture, such as a single frame from a sheet of them.
- drawinto
- Sends all drawing into a picture instead of your window, so you can build something once and draw it many times.
- drawpictureex
- Draws a whole picture, made bigger or flipped.
- drawpartex
- Draws one rectangle of a picture, made bigger or flipped.
- savepicture
- Saves a picture as a
.pxl file, which Paint can open. - parsepicture
- Makes a picture from rows of text, one character for each pixel.
- decodepicture
- Makes a picture from PNG data in memory, such as a file you've read or something downloaded.
- decodepicturefile
- The same as
decodepicture, but reads the PNG from a file. - importpicture
- Brings in a PNG made elsewhere, ready for editing: each pixel becomes the nearest of the 256 colours, and see-through parts become colour 0.
- importpicturefile
- The same as
importpicture, but reads the PNG from a file. - pictureget
- Reads the colour of one pixel of a picture.
- pictureset
- Sets one pixel of a picture to a colour.
- picturesize
- Tells you a picture's width and height in one call.
- pictureclear
- Fills a whole picture with one colour.
- picturecopy
- Makes a new picture that's the same as another one, so you can change the copy and keep the first.
- picturegetrgb
- Reads a pixel's true colour as red, green and blue.
- picturesetrgb
- Sets a pixel's true colour, which shows when the screen is in thousands of colours.