|
| GraphicsStream (Graphics &graphics, const Point &start, unsigned width, unsigned height, Font *font=nullptr) |
| Constructor. More...
|
|
void | setPos (int x, int y) |
| Set the cursor position. More...
|
|
void | getPos (int &x, int &y) const |
| Read the current cursor position. More...
|
|
void | print (char *str, int length, const Color &color=LIGHT_GREY) |
| Display multiple characters in the window starting at the current cursor position. More...
|
|
void | reset (char character=' ', const Color &color=LIGHT_GREY) |
| Clear window and reset cursor. More...
|
|
void | show (int x, int y, char character, const Color &color=LIGHT_GREY) |
| Basic output of a (colored) character at a certain position on the screen. More...
|
|
void | draw () |
| Draw using the Graphics device.
|
|
| OutputStream () |
| Default constructor. Initial number system is decimal.
|
|
virtual | ~OutputStream () |
| Destructor.
|
|
OutputStream & | operator<< (char c) |
| Print a single character. More...
|
|
OutputStream & | operator<< (unsigned char c) |
| Print a single character. More...
|
|
OutputStream & | operator<< (const char *string) |
| Printing a null-terminated string. More...
|
|
OutputStream & | operator<< (bool b) |
| Print a boolean value. More...
|
|
OutputStream & | operator<< (short ival) |
| Print an integral number in radix base. More...
|
|
OutputStream & | operator<< (unsigned short ival) |
| Print an integral number in radix base. More...
|
|
OutputStream & | operator<< (int ival) |
| Print an integral number in radix base. More...
|
|
OutputStream & | operator<< (unsigned int ival) |
| Print an integral number in radix base. More...
|
|
OutputStream & | operator<< (long ival) |
| Print an integral number in radix base. More...
|
|
OutputStream & | operator<< (unsigned long ival) |
| Print an integral number in radix base. More...
|
|
OutputStream & | operator<< (long long ival) |
| Print an integral number in radix base. More...
|
|
OutputStream & | operator<< (unsigned long long ival) |
| Print an integral number in radix base. More...
|
|
OutputStream & | operator<< (const void *ptr) |
| Print a pointer as hexadecimal number. More...
|
|
OutputStream & | operator<< (OutputStream &(*f)(OutputStream &)) |
| Calls one of the manipulator functions. More...
|
|
virtual | ~Stringbuffer () |
| Destructor (nothing to do here)
|
|
Output text (form different data type sources) on screen in graphic mode (similar to TextStream)
Enables output of different data types using a monospaced font on a predefined area of the screen with activated graphics mode.
void GraphicsStream::print |
( |
char * |
str, |
|
|
int |
length, |
|
|
const Color & |
color = LIGHT_GREY |
|
) |
| |
Display multiple characters in the window starting at the current cursor position.
This method can be used to output a string, starting at the current cursor position. Since the string does not need to contain a '\0' termination (as it is usually the case in C), the parameter length
is required to specify the number of characters in the string. When the output is complete, the cursor will be positioned after the last character printed. The entire text uniformly has the color color
If there is not enough space left at the end of the line, the output will be continued on the following line. As soon as the last window line is filled, the entire window area will be moved up one line. The first line disappears and the last line is blank, continuing output there.
A line break will also occurs wherever the character \\n
is inserted in the text to be output.
- Parameters
-
str | String to output |
length | length of string |
color | Foreground color of string |