\8fÍ/3.2_\83\89\83\93\83_\83\80\83h\83b\83g2.cpp - RSS feed" href="/view?p=psychlops/cpp_document.git;a=rss;f=Psychlops.manual/sample_cpp_file/3%C2%8F%C3%8D/3.2_%C2%83%C2%89%C2%83%C2%93%C2%83_%C2%83%C2%80%C2%83h%C2%83b%C2%83g2.cpp" type="application/rss+xml" /> \8fÍ/3.2_\83\89\83\93\83_\83\80\83h\83b\83g2.cpp - RSS feed (no merges)" href="/view?p=psychlops/cpp_document.git;a=rss;f=Psychlops.manual/sample_cpp_file/3%C2%8F%C3%8D/3.2_%C2%83%C2%89%C2%83%C2%93%C2%83_%C2%83%C2%80%C2%83h%C2%83b%C2%83g2.cpp;opt=--no-merges" type="application/rss+xml" /> \8fÍ/3.2_\83\89\83\93\83_\83\80\83h\83b\83g2.cpp - Atom feed" href="/view?p=psychlops/cpp_document.git;a=atom;f=Psychlops.manual/sample_cpp_file/3%C2%8F%C3%8D/3.2_%C2%83%C2%89%C2%83%C2%93%C2%83_%C2%83%C2%80%C2%83h%C2%83b%C2%83g2.cpp" type="application/atom+xml" /> \8fÍ/3.2_\83\89\83\93\83_\83\80\83h\83b\83g2.cpp - Atom feed (no merges)" href="/view?p=psychlops/cpp_document.git;a=atom;f=Psychlops.manual/sample_cpp_file/3%C2%8F%C3%8D/3.2_%C2%83%C2%89%C2%83%C2%93%C2%83_%C2%83%C2%80%C2%83h%C2%83b%C2%83g2.cpp;opt=--no-merges" type="application/atom+xml" />

OSDN Git Service

hk
[psychlops/cpp_document.git] / Psychlops.manual / sample_cpp_file / 3\8fÍ / 3.2_\83\89\83\93\83_\83\80\83h\83b\83g2.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 }