ryu12341
01-12-2005, 03:02 AM
hi guys!!! i just came across this forum looking for some scheme tutorials. This site looks cool and very helpful just by looking at some other threads.
I have a problem with scheme though. I am trying to draw some a picture using scheme's graphic library (graphics.ss). The picture doesnt have to be elaborate at all, could be just a ellipse with some more ellipses as eyes or could be a square or rectangle. I tried doing some coding and all i got was a blank empty box to pop up. I looked through the help desk for some help for drawing some of these shapes and I dont understand it. Maybe some of you scheme guru's can help me out.
this is what i have for code. please dont laugh, as this is my first time using scheme.
(require (lib "graphics.ss" "graphics"))
(open-graphics)
(open-viewport "Bruce" 600 600)
((draw-ellipse viewport) 100 100 100)
(show (draw-ellipse viewport) 100 100 100)
(send a-dc draw-ellipse x y width height)
x: 100
y: 100
width: 200
height: 200
also, could you guys explain the "viewport" as I tried using it as a parameter and it says its an unidentified identifier.
I have a problem with scheme though. I am trying to draw some a picture using scheme's graphic library (graphics.ss). The picture doesnt have to be elaborate at all, could be just a ellipse with some more ellipses as eyes or could be a square or rectangle. I tried doing some coding and all i got was a blank empty box to pop up. I looked through the help desk for some help for drawing some of these shapes and I dont understand it. Maybe some of you scheme guru's can help me out.
this is what i have for code. please dont laugh, as this is my first time using scheme.
(require (lib "graphics.ss" "graphics"))
(open-graphics)
(open-viewport "Bruce" 600 600)
((draw-ellipse viewport) 100 100 100)
(show (draw-ellipse viewport) 100 100 100)
(send a-dc draw-ellipse x y width height)
x: 100
y: 100
width: 200
height: 200
also, could you guys explain the "viewport" as I tried using it as a parameter and it says its an unidentified identifier.