Skip to content

Instantly share code, notes, and snippets.

@syou6162
Created May 23, 2012 12:55
Show Gist options
  • Save syou6162/2775118 to your computer and use it in GitHub Desktop.
Save syou6162/2775118 to your computer and use it in GitHub Desktop.
seesawで線を描画するための最小構成(と思われるもの)。lineをどう引くかだけ見てもらって、実際は100とかの数字をSICPの中の関数とかで計算していくのがメインとなっています
(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