Created
May 23, 2012 12:55
-
-
Save syou6162/2775118 to your computer and use it in GitHub Desktop.
seesawで線を描画するための最小構成(と思われるもの)。lineをどう引くかだけ見てもらって、実際は100とかの数字をSICPの中の関数とかで計算していくのがメインとなっています
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use 'seesaw.core) | |
(use 'seesaw.graphics) | |
(def my-line-style (style :foreground :black)) | |
(def f (frame :title "My first example of Picture Language!!!" | |
:content | |
(canvas :id :canvas | |
:background :white | |
:size [640 :by 480] | |
:paint | |
(fn [_ g] | |
(push g (draw g (line 100 10 300 300) | |
my-line-style)))))) | |
(-> f pack! show!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment