|
|
@ -1,4 +1,5 @@ |
|
|
|
#include "../qtsgraph.h" |
|
|
|
#include "../qtsgraph.h" |
|
|
|
|
|
|
|
#include <string> |
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) |
|
|
|
int main(int argc, char *argv[]) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -19,20 +20,30 @@ void QTSGraph::PaintBox() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Начало рисования
|
|
|
|
// Начало рисования
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i <= 5; i++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
SetPenStyle(1, 1); |
|
|
|
|
|
|
|
SetColor(clBlue); |
|
|
|
|
|
|
|
Rectangle(5, 390 + i * 20, 220, 410 + i * 20); |
|
|
|
|
|
|
|
SetColor(clBlack); |
|
|
|
|
|
|
|
OutTextXY(10, 405 + i * 20, std::to_string(i)); |
|
|
|
|
|
|
|
SetPenStyle(1, i); |
|
|
|
|
|
|
|
Line(30, 400 + i * 20, 200, 400 + i * 20); |
|
|
|
|
|
|
|
} |
|
|
|
SetColor(0x00AAAAAA); |
|
|
|
SetColor(0x00AAAAAA); |
|
|
|
Line(120, 120, 135, 260); |
|
|
|
Line(120, 120, 135, 260); |
|
|
|
SetWidth(5); |
|
|
|
SetPenWidth(5); |
|
|
|
SetColor(clBlue); |
|
|
|
SetColor(clBlue); |
|
|
|
Line(110, 110, 125, 250); |
|
|
|
Line(110, 110, 125, 250); |
|
|
|
PutPixel(100, 100, 0x00FF0000, 10); |
|
|
|
PutPixel(100, 100, 0x00FF0000, 10); |
|
|
|
Delay(2000); |
|
|
|
Delay(1000); |
|
|
|
PutPixel(300, 100); |
|
|
|
PutPixel(300, 100); |
|
|
|
int x = 1; |
|
|
|
int x = 1; |
|
|
|
while(!MouseClicked() && x < 1024) |
|
|
|
while(!MouseClicked() && x < 1024) |
|
|
|
{ |
|
|
|
{ |
|
|
|
PutPixel(x, 50, 0x555555 + x * 16, 5); |
|
|
|
PutPixel(x, 50, 0x555555 + x * 16, 5); |
|
|
|
x += 1; |
|
|
|
x += 1; |
|
|
|
Delay(1); |
|
|
|
Delay(10); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Конец рисования
|
|
|
|
// Конец рисования
|
|
|
|