Computer Graphicdocuments- Table of contents
- Source code dependency graph
- UML class diagram
- Console display
- Implementation
Can be downloaded
and viewed
at here
Can be downloaded
and viewed
at here
We use ANSI escape code color in other
to display 3-bits, 4-bits, 8-bits and 24-bits of color on the console/terminal window.
In the future, we may use 8-bits.
The table below is the 3-bits and 4-bits of color ANSI escape code.
Real implement destination: color.h
Some example for 4-bits color:
| Color | ANSI Color | Color | ANSI Color |
|---|---|---|---|
| Bright Black | \033[1;90m |
Bright Blue | \033[1;94m |
| Bright Red | \033[1;91m |
Bright Magenta | \033[1;95m |
| Bright Green | \033[1;92m |
Bright Cyan | \033[1;96m |
| Bright Yellow | \033[1;93m |
Bright White | \033[1;97m |
The cursor is manually controlled by using ANSI escape code.
Pixel has three uint8_t attributes, r, g, and b, which stand for RED, GREEN, and BLUE, respectively.
class Pixel {
uint8_t r, g, b;
};