OSDN Git Service

hk
[psychlops/cpp_document.git] / Psychlops.manual / sample_cpp_file / 2�� / 2.2.5_�F�̐ݒ�2.cpp
1 #include <psychlops.h>
2 using namespace Psychlops;
3
4 Psychlops::Rectangle rect1,rect2,rect3;
5 Psychlops::Color col1,col2,col3;
6
7 void psychlops_main() {
8
9         Canvas sampleA(Canvas::fullscreen);
10         sampleA.clear(Color(0.25,0.25,0.25));
11         rect1.set(50,50);
12         rect2.set(rect1);
13         rect3.set(rect1);
14         rect1.centering().shift(-100,0);
15         rect2.centering();
16         rect3.centering().shift(100,0);
17         //\90F\82Ì\90Ý\92è
18         col1.set(1.0,0.0,0.0,0.25);
19         col2.set(1.0,0.0,0.0,0.5);
20         col3.set(1.0,0.0,0.0,1.0);
21         sampleA.rect(rect1,col1);
22         sampleA.rect(rect2,col2);
23         sampleA.rect(rect3,col3);
24         sampleA.flip();
25         while(!Input::get(Keyboard::spc));
26 }