OSDN Git Service

hk
[psychlops/cpp_document.git] / Psychlops.manual / sample_cpp_file / 3�� / 3.2_�����_���h�b�g2.cpp
1 #include <psychlops.h>
2 using namespace Psychlops;
3
4 double width=100,height=100;
5 double temp1,temp2,temp3,temp4;
6 Psychlops::Rectangle rect1(width,height);
7 Psychlops::Color col;
8 Psychlops::Image Noise1(rect1,Image::RGBA);
9
10 void psychlops_main() {
11
12         Canvas sampleA(Canvas::fullscreen);
13         Noise1.centering();
14         for(int x=0; x<width; x++){
15                 for(int y=0; y<height; y++){
16                         //R,G,B,A\82»\82ê\82¼\82ê\82É0\81`1\82Ì\92l\82ð\83\89\83\93\83_\83\80\82É\95Ô\82µ\82Ü\82·
17                         temp1=Psychlops::random();
18                         temp2=Psychlops::random();
19                         temp3=Psychlops::random();
20                         temp4=Psychlops::random();
21                         col.set(temp1,temp2,temp3,temp4);
22                         Noise1.pix(x,y,col);
23                 }
24         }
25         Noise1.draw();
26         sampleA.flip();
27         while(!Input::get(Keyboard::spc));
28 }