X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=test4%2FPsychlopsMain.cs;h=f5df20f5ae8f495158ec670704cfbdcbe95205d5;hb=9f47dcd91507b95984913358b5b313f1e304a091;hp=5e19dfb4acfc28ad82b2d27ff101177f5b1724df;hpb=c7bc82580bbb03f0dcec6f68178513cc94152dcc;p=psychlops%2Fsilverlight.git diff --git a/test4/PsychlopsMain.cs b/test4/PsychlopsMain.cs index 5e19dfb..f5df20f 100644 --- a/test4/PsychlopsMain.cs +++ b/test4/PsychlopsMain.cs @@ -1,4 +1,70 @@ -using Psychlops; + +using Psychlops; + +namespace PsychlopsSilverlight4test +{ + + public class PsychlopsMain + { + + Psychlops.Widgets.Slider rect_size; + Psychlops.Widgets.Slider rect_lum; + Psychlops.Widgets.Slider bg_lum; + + + void RectLuminance() + { + Canvas display = new Canvas(Canvas.window); + Interval rng = new Interval(); + rect_size = new Psychlops.Widgets.Slider("Rect Size", 1 < rng < 500, 10.0); + rect_lum = new Psychlops.Widgets.Slider("Rect Luminance", 0.0 <= rng <= 1.0, 0.1); + bg_lum = new Psychlops.Widgets.Slider("BG Luminance", 0.0 <= rng <= 1.0, 0.1); + Ellipse drawee = new Ellipse(100, 100); + display.showFPS(); + display.watchFPS(); + + Rectangle rect = new Rectangle(rect_size, rect_size); + rect.centering(); + + + Clock before = new Clock(), after = new Clock(); + while (!Keyboard.esc.pushed()) + { + Display.clear(bg_lum); + rect.resize(rect_size, rect_size).draw(rect_lum); + after.update(); + display.var((after - before).at_msec(), 100, 100, Color.green); + display.var((after - before).at_msec(), 100, 200, Color.green); + drawee.centering().shift(Math.random(100), 0); + drawee.draw(Color.black); + Display.flip(); + } + + } + + + public void psychlops_main() + { + RectLuminance(); + } + + + } + +} + + + + + + + + + + + +/* + using Psychlops; namespace PsychlopsSilverlight4test { @@ -126,7 +192,7 @@ namespace PsychlopsSilverlight4test } } - +*/ /*using Psychlops;