how to draw lines
Author |
Message |
GhettoSingh
|
Posted: 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. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
AsianSensation
|
Posted: Mon Jun 09, 2003 9:40 pm Post subject: (No subject) |
|
|
drawline(x1,y1,x2,y2,color)
as for the grid, draw the line using a for loop(im assuming you know for loops) |
|
|
|
|
|
Tony
|
Posted: Mon Jun 09, 2003 9:41 pm Post subject: (No subject) |
|
|
Draw.Line(x1,y1,x2,y2,color)
to draw a grid, you just use two forloops. One for horizontal lines, one for vertical |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
GhettoSingh
|
Posted: Mon Jun 09, 2003 9:42 pm Post subject: (No subject) |
|
|
i'm not too sure about them loops but i will try |
|
|
|
|
|
PaddyLong
|
Posted: Mon Jun 09, 2003 9:47 pm Post subject: (No subject) |
|
|
a basic one that grids up the entire window
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
|
|
|
|
|
|
|
|
|