1 // Librairie a utiliser:
3 // D:\Michel\MesAppl\Spider_DLL\Spider\Debug\Spider.lib
8 #include "SpiderDraw.h"
9 #include "SpiderUser.h"
12 int main(int argc
,char *argv
[],char *envp
[])
14 cout
<< "Hello" << endl
<< endl
;
17 cout
<< "Ouverture fenetre..." << endl
;
19 Spider::initWindow("Programme de test");
21 Spider::moveTo(700,700);
22 Spider::Draw::Color color
= Spider::Draw::getPixel();
23 Spider::moveTo( 50, 50); Spider::Draw::displayText("0");
24 Spider::moveTo(100,100); Spider::Draw::displayText("1");
25 Spider::moveTo(150, 50); Spider::Draw::displayText("2");
26 Spider::moveTo(200,100); Spider::Draw::displayText("3");
27 Spider::moveTo(250, 50); Spider::Draw::displayText("4");
28 Spider::moveTo(300,100); Spider::Draw::displayText("5");
29 Spider::moveTo(350, 50); Spider::Draw::displayText("6");
30 Spider::moveTo(400,100); Spider::Draw::displayText("7");
31 Spider::moveTo(450, 50); Spider::Draw::displayText("8");
32 Spider::moveTo(500,100); Spider::Draw::displayText("9");
35 // Spider::Draw::Color color;
40 for(color
.r
=0;(color
.r
<256);(color
.r
)++)
42 Spider::Draw::setColorPen(color
);
43 Spider::lineTo(50+color
.r
,250,
50 for(color
.g
=0;(color
.g
<256);(color
.g
)++)
52 Spider::Draw::setColorPen(color
);
53 Spider::lineTo(50+color
.g
,300,
60 for(color
.b
=0;(color
.b
)<256;(color
.b
)++)
62 Spider::Draw::setColorPen(color
);
63 Spider::lineTo(50+color
.b
,350,
68 color
.r
= 255; color
.g
= 255; color
.b
= 0; Spider::Draw::setColorPen(color
);
69 Spider::moveTo(260,300); Spider::Draw::circle(10,Spider::Draw::noFill
);
70 Spider::moveTo(260,350); Spider::Draw::circle(10,Spider::Draw::fill
);
72 color
.r
= 0; color
.g
= 255; color
.b
= 255; Spider::Draw::setColorPen(color
);
78 char car
[2]; car
[1] = 0x00;
81 if(Spider::User::keyPressed(&car_temp
))
84 if(Spider::User::leftClic(x
,y
))
86 Spider::lineTo(ax
,ay
,x
,y
);
87 cout
<< "Ajout du point (" << x
<< "," << y
<< ")." << endl
;
89 Spider::Draw::displayText(car
);
96 Spider::User::delay(50);
100 Spider::User::delay(50000);
102 Spider::closeWindow();