OSDN Git Service

hk
[psychlops/cpp_document.git] / Psychlops.manual / sample_cpp_file / 3�� / 3.1.4_���W�I�ȓ��e(Image)3.cpp
1 #include <psychlops.h>
2 using namespace Psychlops;
3
4 double width=100,height=100;
5 Psychlops::Rectangle rect1(width,height);
6 Psychlops::Color col;
7 Psychlops::Image Noise1(rect1);
8
9 void psychlops_main() {
10
11         Canvas sampleA(Canvas::fullscreen);
12         Noise1.quicken();
13         Noise1.centering();
14         while(!Input::get(Keyboard::spc)){
15                 for(int x=0; x<width; x+=3){
16                         for(int y=0; y<height; y+=3){
17                                 col.set(0.5,0.2,0.8);
18                                 Noise1.pix(x,y,col);
19                         }
20                 }
21         Noise1.draw();
22         sampleA.flip();
23         Noise1.quicken(false);
24         }
25 }