Knit Project Update
My girlfriend has suggested a very important update to the Knit Project program. She needs to be able to draw lines, It just takes to long to click each cell individually. It would also be nice if she could draw circles or squares as well.
Another update is to allow adding/removing rows/columns of the current pattern. Right now you have to restart from a blank pattern if you need to change the size.
I’m not entirely sure how I’m going to draw the line yet. Three ideas that come to mind are to use the Canvas feature in the newer browsers, or to use an image, or maybe yet, to do a colored div. The div might be the easiest to get started. Then I need to figure out how to notify the cells under the div that they’ve been clicked. I think that’s about all I need to do for the simple draw a line.
To notify the cells under the line. Well if it’s a straight line, then it would be easier because I could just find the starting cell and the ending cell, figure out if they are on different rows or not, and call the proper click method on each. If it’s a diagonal, then it gets a little more complicated. If I look I might be able to find some line algorithm out there that solves this problem already, or maybe it’s simpler than I’m imagining.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
