35void setCursor(
int x,
int y) {
50int isCursorVisible() {
53void setChar(
int x,
int y,
char c) {
56void setAnsiCurrent(
const char* ansi) {
59void setAnsiCurrent(
const std::string& ansi) {
62void setAnsi(
int x,
int y,
const char* ansi) {
65void setAnsi(
int x,
int y,
const std::string& ansi) {
68void rect(
int x,
int y,
int width,
int height,
char c) {
71void fillRect(
int x,
int y,
int width,
int height,
char c) {
74void circle(
int x,
int y,
int radius,
char c) {
77void fillCircle(
int x,
int y,
int radius,
char c) {
80void ellipse(
int x,
int y,
int xradius,
int yradius,
char c) {
83void fillEllipse(
int x,
int y,
int xradius,
int yradius,
char c) {
87 int x,
int y,
int rx,
int ry,
double xrot,
int arcflag,
int sweepflag,
88 int dx,
int dy,
char c
90 Canvas_arc(x, y, rx, ry, xrot, arcflag, sweepflag, dx, dy, c);
92void drawText(
int x,
int y,
char* text) {
95void drawText(
int x,
int y,
const std::string& text) {
98void drawAscii(
int x,
int y,
char ascii[8][5]) {
101void drawAsciiText(
int x,
int y,
char c,
const char* text) {
104void drawAsciiText(
int x,
int y,
char c,
const std::string& text) {
110void setForeground(
int rgb) {
113void setBackground(
int rgb) {
116void setColor8(
int color) {
119void setForeground256(
int color) {
122void setBackground256(
int color) {
140void disableItalic() {
143void enableUnderline() {
146void disableUnderline() {
158void disableInvert() {
164void disableHidden() {
167void enableStrikethrough() {
170void disableStrikethrough() {
173void hLine(
int x,
int y,
int width,
char c) {
176void vLine(
int x,
int y,
int height,
char c) {
179void line(
int x1,
int y1,
int x2,
int y2,
char c) {
182void polygon(
int x,
int y,
int sides,
int radius,
char c) {
185void fillPolygon(
int x,
int y,
int sides,
int radius,
char c) {
188void quad(
int x,
int y,
int x1,
int y1,
int x2,
int y2,
char c) {
192 int x,
int y,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
char c
Canvas API for drawing shapes and text on the terminal.
void Canvas_disableUnderline()
Disables the underline text attribute.
void Canvas_enableStrikethrough()
Enables the strikethrough text attribute.
void Canvas_enableBlink()
Enables the blink text attribute.
void Canvas_circle(int x, int y, int radius, char c)
Draws a hollow circle.
void Canvas_setColor8(int color)
Sets the color at the current cursor position using the built-in 8-bit color palette.
void Canvas_disableHidden()
Disables the hidden text attribute.
void Canvas_enableBold()
Enables the bold text attribute.
void Canvas_ellipse(int x, int y, int xradius, int yradius, char c)
Draws a hollow ellipse.
void Canvas_disableStrikethrough()
Disables the strikethrough text attribute.
void Canvas_fillRect(int x, int y, int width, int height, char c)
Fills a rectangle with a character.
void Canvas_setChar(int x, int y, char c)
Sets a character at a specific position.
void Canvas_rect(int x, int y, int width, int height, char c)
Draws a hollow rectangle.
void Canvas_setBackground(int rgb)
Sets the background color at the current cursor position.
void Canvas_enableItalic()
Enables the italic text attribute.
void Canvas_setAnsiCurrent(const char *ansi)
Appends the ANSI code at the current cursor position.
void Canvas_hLine(int x, int y, int width, char c)
Draws a horizontal line.
void Canvas_setForeground256(int color)
Sets the foreground color at the current cursor position using the built-in 256-color palette.
void Canvas_drawText(int x, int y, char *text)
Draws text at the current cursor position.
void Canvas_cubic(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3, char c)
Draws a cubic Bezier curve.
void Canvas_setForeground(int rgb)
Sets the foreground color at the current cursor position.
void Canvas_drawAsciiText(int x, int y, char character, const char *text)
Draws text at a specific position.
void Canvas_setBackground256(int color)
Sets the background color at the current cursor position using the built-in 256-color palette.
void Canvas_hideCursor()
Hides the cursor.
void Canvas_showCursor()
Shows the cursor.
void Canvas_enableInvert()
Enables the invert text attribute.
void Canvas_line(int x1, int y1, int x2, int y2, char c)
Draws a line between two points.
int Canvas_getWidth()
Gets the width of the canvas, which is the width of the terminal.
int Canvas_isCursorVisible()
Gets the cursor visibility.
int Canvas_getCursorX()
Gets the cursor position.
void Canvas_quad(int x, int y, int x1, int y1, int x2, int y2, char c)
Draws a quadratic Bezier curve.
void Canvas_disableBlink()
Disables the blink text attribute.
void Canvas_resetFormat()
Resets all formatting at the current cursor position.
void Canvas_enableDim()
Enables the dim text attribute.
void Canvas_fillPolygon(int x, int y, int sides, int radius, char c)
Fills a polygon with a character.
void Canvas_disableDim()
Disables the dim text attribute.
void Canvas_enableUnderline()
Enables the underline text attribute.
void Canvas_polygon(int x, int y, int sides, int radius, char c)
Draws a polygon.
void Canvas_disableBold()
Disables the bold text attribute.
void Canvas_setCursor(int x, int y)
Sets the cursor position.
void Canvas_clearScreen()
Clears the screen.
void Canvas_disableItalic()
Disables the italic text attribute.
void Canvas_fillEllipse(int x, int y, int xradius, int yradius, char c)
Fills an ellipse with a character.
int Canvas_getCursorY()
Gets the cursor position.
void Canvas_fillCircle(int x, int y, int radius, char c)
Fills a circle with a character.
void Canvas_setAnsi(int x, int y, const char *ansi)
Appends the ANSI code at a specific position.
int Canvas_getHeight()
Gets the height of the canvas, which is the height of the terminal.
void Canvas_drawAscii(int x, int y, char ascii[8][5])
Draws an ASCII character at a specific position.
void Canvas_vLine(int x, int y, int height, char c)
Draws a vertical line.
void Canvas_enableHidden()
Enables the hidden text attribute.
void Canvas_disableInvert()
Disables the invert text attribute.
void Canvas_arc(int x, int y, int rx, int ry, double xrot, int arcflag, int sweepflag, int dx, int dy, char c)
Draws an elliptical arc.
C++ wrapper for the CmdFX canvas.
Definition canvas.hpp:25
Primary namespace for CmdFX.
Definition cmdfx.hpp:26