Computer Science Canada

how to draw lines

Author:  GhettoSingh [ Mon Jun 09, 2003 9:34 pm ]
Post subject:  how to draw lines

i need to draw a grid with 7 columns and 5 rows can anyone tell me how to draw lines or if there is a specific command for drawing grids.

Author:  AsianSensation [ Mon Jun 09, 2003 9:40 pm ]
Post subject: 

drawline(x1,y1,x2,y2,color)
as for the grid, draw the line using a for loop(im assuming you know for loops)

Author:  Tony [ Mon Jun 09, 2003 9:41 pm ]
Post subject: 

Draw.Line(x1,y1,x2,y2,color)

to draw a grid, you just use two forloops. One for horizontal lines, one for vertical

Author:  GhettoSingh [ Mon Jun 09, 2003 9:42 pm ]
Post subject: 

i'm not too sure about them loops but i will try

Author:  PaddyLong [ Mon Jun 09, 2003 9:47 pm ]
Post subject: 

a basic one that grids up the entire window Smile

code:

var spaceBetweenGrids : int := 10

for q : 1 .. maxx - 1 by spaceBetweenGrids
    for w : 1 .. maxy - 1 by spaceBetweenGrids
        drawline (0, w, maxx, w, 7)
        drawline (q, 0, q, maxy, 7)
    end for
end for


: