Pete or any NEIL guru,
Here is a short program that I am writing. It is supposed to put 2
rectangles on the screen. The second one after a keypress. The first is
red, the second blue. The first uses display_image () and the second uses
pixel (). The two rectangles are supposed to be exactly the same in size,
shape, and placement but different color. It doesn't seem to work right,
can anyone tell me what I'm doing wrong?
Lewis Townsend
--HERE IT IS
include neil.e
include get.e
procedure draw_rectangle (atom color, sequence ul, sequence dims, atom scr)
if scr = screen then
display_image (ul, repeat (repeat (color, dims[1]), dims[2]))
else
for line = 0 to dims[1]-1 do
pixel (repeat (color, dims[1]), {ul[1], ul[2]})
end for
end if
end procedure
if gfx_mode (640, 480, 16) then end if
draw_rectangle (#FF0000, {100,50}, {50,100}, screen)
if wait_key () then end if
draw_rectangle (#0000FF, {100,50}, {50,100}, 1234)
if wait_key () then end if
restore_mode ()
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com
|
Not Categorized, Please Help
|
|