Libraries
\ Sprite
Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
Name |
Sprite |
Examples |
#include "Binary.h"
#include "Sprite.h"
#include "Matrix.h"
Matrix myMatrix = Matrix(0, 2, 1);
Sprite wave = Sprite(
8, 4,
B00011000,
B00100100,
B01000010,
B10000001
);
void setup()
{
}
int x = 0;
void loop()
{
myMatrix.write(x, 2, wave);
myMatrix.write(x - 8, 2, wave);
delay(75);
myMatrix.clear();
if (x == 8)
{
x = 0;
}
x++;
}
|
Description |
The Sprite library allows for creating image sprites to be used with the Matrix library. |
Syntax |
Sprite(width, height)
Sprite(width, height, row1, row2, ...)
|
Methods |
|
Parameters |
width |
The width in pixels of the sprite |
height |
The height in pixels of the sprite |
row1, row2, ... |
The pixel rows specified in binary notation. Pixel values are set as 0 or 1's. |
|
Returns |
None |
Usage |
Application |
Updated on July 07, 2011 11:11:46pm PDT