Skip to content

Latest commit

 

History

History
74 lines (55 loc) · 2.47 KB

File metadata and controls

74 lines (55 loc) · 2.47 KB

Computer Graphic documents

Table of contents

Source code dependency graph


Can be downloaded and viewed at here Dependency graph

UML class diagram


Can be downloaded and viewed at here Dependency graph

Console display


Color

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

Cursor control

The cursor is manually controlled by using ANSI escape code.

Implementation

Pixel

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;
};

Real implement destination: Pixel.h, Pixel.cpp

Screen