Anti-aliased lines based on Gupta-Sproull algorithm
-
Hello everyone, i am new to MFC and VC++ programming in general. What i am trying to do right now is write a program that will allow me to draw lines based on a Gupta-Sproull midpoint algorithm. There is Bresenham algorithm but it's different. I believe it does not use distance. So the idea is if i'll left click on a mouse i select a control point on the screen and then can drag anywhere to draw a line. If i right button click then i end control point selection. By using this method i am trying to write something like WAKE which consists of bunch of lines. My problem is to get started. When i created a project in Visual studio it gives me loads of files for modification. Where should i start and does anyone have a sample code of that algorithm or how and where to use LButtonClick and RButtonClick... Any help will be appreaciated. The fact that i am new to this sample codes are the best. thanks
-
Hello everyone, i am new to MFC and VC++ programming in general. What i am trying to do right now is write a program that will allow me to draw lines based on a Gupta-Sproull midpoint algorithm. There is Bresenham algorithm but it's different. I believe it does not use distance. So the idea is if i'll left click on a mouse i select a control point on the screen and then can drag anywhere to draw a line. If i right button click then i end control point selection. By using this method i am trying to write something like WAKE which consists of bunch of lines. My problem is to get started. When i created a project in Visual studio it gives me loads of files for modification. Where should i start and does anyone have a sample code of that algorithm or how and where to use LButtonClick and RButtonClick... Any help will be appreaciated. The fact that i am new to this sample codes are the best. thanks
I'd just draw on a plain dialog surface. Create a dialog-based MFC application. Draw your lines and things in the dialog's OnPaint handler. Add button click handlers for the dialog.