SimpleCxxLib package#include "gwindow.h"GWindow class which supports
drawing graphical objects on the screen.
| Class | |
| This class represents a graphics window that supports simple graphics. | |
| Functions | |
| Converts a color name into an integer that encodes the red, green, and blue components of the color. | |
Converts an rgb value into a color name in the form "#rrggbb". | |
| Closes all graphics windows and exits from the application without waiting for any additional user interaction. | |
| Returns the height of the entire display screen. | |
| Returns the width of the entire display screen. | |
| Pauses for the indicated number of milliseconds. | |
| Issues a request to update all graphics windows. | |
| Waits for a mouse click to occur anywhere in any window. | |
void repaint();
Usage:
repaint();
void pause(double milliseconds);
Usage:
pause(milliseconds);
double getScreenWidth();
Usage:
width = getScreenWidth();
double getScreenHeight();
Usage:
height = getScreenHeight();
int convertColorToRGB(string colorName);
Usage:
int rgb = convertColorToRGB(colorName);
string convertRGBToColor(int rgb);
rgb value into a color name in the
form "#rrggbb". Each of the rr,
gg, and bb values are two-digit
hexadecimal numbers indicating the intensity of that component.
Usage:
int colorName = convertRGBToColor(rgb);
void waitForClick();
Usage:
waitForClick();
void exitGraphics();
Usage:
exitGraphics();