Computer Science Canada Paint Program:Staying on the canvas. |
Author: | Neja [ Wed Jan 07, 2004 10:11 pm ] | ||
Post subject: | Paint Program:Staying on the canvas. | ||
How to I get the drawing part to stay on the canvas? (This is for drawing lines) I've fixed it so that if you click somewhere outside the canvas, it won't work, but if you click for the first point of the line to be on the canvas and then click somewhere outside the canvas, it will draw the line (like it's not supposed to). THis is for a paint program I'm supposed to make and I really suck at programming. Instead of posting the whole program, I'll just post the essential part of it;
And if you all look you'll see that most of this code is in the Turing Refrence. No, I'm not stealing, I'm trying to learn this code and how to keep the lines within a set perimeter so I can apply it to my program. |
Author: | Neja [ Wed Jan 07, 2004 10:15 pm ] |
Post subject: | |
Oh! I apologize. I didn't realize chibitenshi_03 has a similar problem. Never mind this then. |