TX Library Help – Version: 00173a, Revision: 173
 ALL  Windows graphics in a sandbox

Example02.cpp

См. документацию.
00001 //{=========================================================================== 
00011 //              $Copyright: (C) Ded (Ilya Dedinsky, http://txlib.ru) <mail@txlib.ru> $
00012 //}===========================================================================
00013 
00014 #include "TXLib.h"
00015 
00016 int main()
00017     {
00018     txCreateWindow (800, 600);
00019 
00020     txSetColor (TX_WHITE);
00021     txSetFillColor (TX_TRANSPARENT);
00022     txRectangle (10, 10, 790, 590);
00023 
00024     txSetColor (TX_LIGHTCYAN);
00025     txEllipse (200, 150, 600, 450);
00026     txEllipse (245, 150, 555, 450);
00027     txEllipse (290, 150, 510, 450);
00028     txEllipse (330, 150, 470, 450);
00029     txEllipse (375, 150, 425, 450);
00030     txEllipse (200, 150, 600, 450);
00031     txEllipse (200, 190, 600, 410);
00032     txEllipse (200, 230, 600, 370);
00033     txEllipse (200, 270, 600, 330);
00034     txLine    (200, 300, 600, 300);
00035 
00036     txSetColor (TX_LIGHTGREEN);
00037     txSelectFont ("Times New Roman", 60);
00038     txSetTextAlign (TA_CENTER);
00039     txTextOut (400, 480, "Hello, world!");
00040 
00041     txSetColor (TX_YELLOW);
00042     txSetFillColor (TX_YELLOW);
00043     txLine   (385, 135, 385, 120);
00044     txLine   (385, 135, 375, 150);
00045     txLine   (385, 135, 395, 150);
00046     txLine   (385, 125, 375, 135);
00047     txLine   (385, 125, 400, 120);
00048     txCircle (385, 115, 6);
00049 
00050     txSetFillColor (TX_TRANSPARENT);
00051     txLine (400, 75, 400, 150);
00052     txRectangle (400, 75, 450, 115);
00053     txSelectFont ("Times New Roman", 20);
00054     txTextOut (425, 85, "C++");
00055 
00056     txTextCursor (false);
00057     return 0;
00058     }
00059 
00060 
00061 
00062 
00063