PIP 5.6.1
Platform-Independent Primitives
Public Types | Public Member Functions | Static Public Member Functions | List of all members
PIScreenDrawer Class Reference

Helper that draws primitives and text into a PIScreen cell buffer. More...

#include <piscreendrawer.h>

Public Types

enum  ArtChar {
}
 Predefined pseudographic and widget-state symbols. More...
 

Public Member Functions

void clear ()
 Clears the whole target buffer.
 
void clearRect (int x0, int y0, int x1, int y1)
 Clears a rectangular area in the target buffer with spaces.
 
void drawPixel (int x, int y, const PIChar &c, PIScreenTypes::Color col_char=PIScreenTypes::Default, PIScreenTypes::Color col_back=PIScreenTypes::Default, PIScreenTypes::CharFlags flags_char=0)
 Draws one cell at position (x, y).
 
void drawLine (int x0, int y0, int x1, int y1, const PIChar &c, PIScreenTypes::Color col_char=PIScreenTypes::Default, PIScreenTypes::Color col_back=PIScreenTypes::Default, PIScreenTypes::CharFlags flags_char=0)
 Draws a line between two points.
 
void drawRect (int x0, int y0, int x1, int y1, const PIChar &c, PIScreenTypes::Color col_char=PIScreenTypes::Default, PIScreenTypes::Color col_back=PIScreenTypes::Default, PIScreenTypes::CharFlags flags_char=0)
 Draws a rectangular outline with the specified symbol.
 
void drawFrame (int x0, int y0, int x1, int y1, PIScreenTypes::Color col_char=PIScreenTypes::Default, PIScreenTypes::Color col_back=PIScreenTypes::Default, PIScreenTypes::CharFlags flags_char=0)
 Draws a frame using predefined art symbols.
 
void drawText (int x, int y, const PIString &s, PIScreenTypes::Color col_char=PIScreenTypes::Default, PIScreenTypes::Color col_back=PIScreenTypes::Transparent, PIScreenTypes::CharFlags flags_char=0)
 Draws text starting at (x, y).
 
void fillRect (int x0, int y0, int x1, int y1, const PIChar &c, PIScreenTypes::Color col_char=PIScreenTypes::Default, PIScreenTypes::Color col_back=PIScreenTypes::Default, PIScreenTypes::CharFlags flags_char=0)
 Fills a rectangular area with one symbol and cell format.
 
void fillRect (int x0, int y0, int x1, int y1, PIVector< PIVector< PIScreenTypes::Cell > > &content)
 Copies a cell matrix into a rectangular area.
 
PIChar artChar (const ArtChar type) const
 Returns a predefined art symbol.
 

Static Public Member Functions

static void clear (PIVector< PIVector< PIScreenTypes::Cell > > &cells)
 Fills an arbitrary cell buffer with default cells.
 

Detailed Description

Helper that draws primitives and text into a PIScreen cell buffer.

Provides methods for drawing primitives such as pixels, lines, rectangles, and text on console screen.

Member Enumeration Documentation

◆ ArtChar

Predefined pseudographic and widget-state symbols.

Defines available characters for drawing ASCII art primitives.

Enumerator
LineHorizontal 

Horizontal line symbol.

Cross 

Line intersection symbol.

CornerTopLeft 

Top-left frame corner.

CornerTopRight 

Top-right frame corner.

CornerBottomLeft 

Bottom-left frame corner.

CornerBottomRight 

Bottom-right frame corner.

Unchecked 

Unchecked box symbol.

Checked 

Checked box symbol.