Learning Objects in C++, Lines, Circles, cwin graphics, objects.

Beginner here, just joined this site. Need some help if I can get it. I'll keep this short.

SO, I need to modify this program to have a "thicker" line, by having two lines as one, by using the .move() method. I don't even know where to insert the .move in this block. Dig? Can anybody help me?

I've been messing with this for almost two hours trying to make the line "thicker" by having a 2nd line 0.25 units away from the first. I have tried countless combinations. Its driving me crazy. Nothing about this in my textbook, nothing clear or beneficial in the handout my professor gave me. I can't even find anything online helpful.


I would post the modifications that I made, but they are countless and far beyond deleted in frustration.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 //draw points and lines into the cwin window where the user clicks.
//mousedraw.cpp   
#include "ccc_win.h"
#include “ccc_msw.cpp”  
#include “ccc_shap.cpp”

int ccc_win_main()
	{
	int i; 
	Point p(0,0), pold;	//pold to save previous coordinates
	for (i = 0;; i++)  // draw circles or points or lines, forever
	{
		pold = p; //save previous coordinates to draw line from
		p = cwin.get_mouse("click mouse to draw lines");
		cwin << p;	//show the point (optional)
		if (i>0) // don't draw bogus line to 1st point
		  cwin << Line(pold, p);	//connect points with lines 
	}
	return 0;
}
Topic archived. No new replies allowed.