Macaw OS C reference

Function drawpart

#include <macaw.h>
void drawpart(
    int p,
    int sx,
    int sy,
    int sw,
    int sh,
    int x,
    int y,
    int key
);

Draws one rectangle of a picture, such as a single frame from a sheet of them.

Parameters

pint
The picture's number.
sxint
How far the part's left edge is from the picture's left edge, in pixels.
syint
How far the part's top edge is from the picture's top, in pixels.
swint
The part's width in pixels.
shint
The part's height in pixels.
xint
How far it goes from the window's left edge, in pixels.
yint
How far it goes from the window's top, in pixels.
keyint
A colour to leave out so it's see-through, usually 0, or -1 to draw every pixel.

In Pictures, with newpicture, loadpicture, freepicture, picturewidth, pictureheight, drawpicture, drawinto, drawpictureex, drawpartex, savepicture, parsepicture, decodepicture, decodepicturefile, importpicture, importpicturefile, pictureget, pictureset, picturesize, pictureclear, picturecopy, picturegetrgb, picturesetrgb.