|
| shapes (PAINTSTRUCT &ps) |
| Constructor. More...
|
|
void | color (int r, int g, int b) |
| Set color for drawings. More...
|
|
void | color (int c) |
|
void | bgcolor (int c) |
| set background color
|
|
void | bgcolor (int r, int g, int b) |
|
void | transparent (bool f=true) |
| enable/disable transparent background
|
|
void | penThick (int t) |
| Set pen thickness in pixels.
|
|
void | fill (bool f=true) |
| Set filling option.
|
|
void | pixel (int x, int y) |
| Color a pixel.
|
|
void | line (const std::vector< int > &v) |
| Draw line between two points. More...
|
|
void | polyLine (POINT *pp, int n) |
|
void | rectangle (const std::vector< int > &v) |
| Draw rectangle. More...
|
|
void | polygon (const std::vector< int > &v) |
| Draw Polygon. More...
|
|
void | arc (int x, int y, double r, double sa, double ea) |
| Draw Arc of circle. More...
|
|
void | circle (int x0, int y0, double r) |
| Draw circle. More...
|
|
void | text (const std::string &t, const std::vector< int > &v) |
| Draw text. More...
|
|
void | textCenterHz (const std::string &t, const std::vector< int > &v) |
|
void | textVertical (bool f=true) |
| Enable / disable drawing text in vertical orientation.
|
|
void | textHeight (int h) |
| Set text height. More...
|
|
void | textFontName (const std::string &fn) |
| set text font name
|
|
int | textWidthPixels (const std::string &t) |
|
A class that offers application code methods to draw on a window.
// construct top level window
gui& form = wex::windex::topWindow();
form.move({ 50,50,400,400});
form.text("A windex draw demo");
form.events().draw([]( PAINTSTRUCT& ps )
{
shapes S( ps );
S.color( 255, 0, 0 );
S.line( { 10,10, 50,50 } );
S.color( 255,255,255 );
S.rectangle( { 20,20,20,20});
S.color( 255,255,0 );
S.text( "test", {50,50,50,25} );
S.color(0,0,255);
S.circle( 100,100,40);
S.arc( 100,100,30, 0, 90 );
});
form.show();