PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Examples
Badge
01 Display
07 Box and Lines.c
1
/*
2
Box and Lines.c
3
Box and line functions have parameters of xi, yi, xf, yf, color.
4
Valid x ranges are 0 to 127, and valid y ranges are 0 to 63. These
5
pixel counts are measured from the top-left. The color is just one
6
bit, with 1 indicating white and 0 black. Pixel counts are measured
7
from the top-left.
8
*/
9
10
#include "simpletools.h"
// Include simpletools library
11
#include "
badgetools.h
"
// Include badgetools library
12
13
int
x, y;
14
15
void
main
()
// Main function
16
{
17
badge_setup
();
// Call badge setup
18
box
(32, 16, 96, 48, 1);
// box (32, 16)...(96, 48)
19
line
(32, 16, 96, 48, 1);
// Line diagonal in box
20
pause(500);
// Wait 1/2 s
21
line
(32, 48, 96, 16, 1);
// Other diagonal
22
}
box
void box(int x0, int y0, int x1, int y1, int c)
Plot a box on the oLED screen.
main
int main(void)
Definition:
GraphicsTest.c:20
badge_setup
int badge_setup(void)
Set up all available badge drivers. Call this function at the start of any given program to allow acc...
Definition:
badgealpha.c:29
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
line
void line(int x0, int y0, int x1, int y1, int c)
Plot a line on the oLED screen.
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12