Computer Science Canada Help with a grid procedure |
Author: | Danjen [ Fri Nov 24, 2006 12:14 pm ] | ||
Post subject: | Help with a grid procedure | ||
I'm trying to make a customizable grid program, that lets the user input the X, Y, X size, Y size, # of lines and color, but something keeps screwing up for some odd reason and the lines won't align properly. Basically, the first for statement works okay, but then I can't determine a formula for the second for statement. ![]()
|
Author: | Windsurfer [ Sat Nov 25, 2006 6:54 pm ] |
Post subject: | |
Your problem comes from having no real "grid" but rather you just have a method of drawing diagonal lines... what you need to do is make a function that draws dots on the screen in your grid fashion... then you can figure out how to draw them. Then you will always be able to have any grid line up. |