30baz
11-17-2008, 06:15 PM
guys i really need some to help me solve this problem i need the code urgently :) thnks aloy
----------------------------------------------------------------------
Implement a program that lets the user type in a file name that contains
information about a clipping rectangle (with edges parallel to the x- and y-axes)
and some line segments. Your program should determine the sum of the line
lengths inside the clipping rectangle. You must draw all line segments before and
after clipping along with the clipping rectangle.
Below is a sample file.
2 2 5 5
3 1 6 4
3 3 4 4
1 5 3 6
3 1 2 6
The first row contains the coordinates of two corners of the clipping rectangle.
The subsequent rows contain the start and end points of different line segments.
----------------------------------------------------------------------
Implement a program that lets the user type in a file name that contains
information about a clipping rectangle (with edges parallel to the x- and y-axes)
and some line segments. Your program should determine the sum of the line
lengths inside the clipping rectangle. You must draw all line segments before and
after clipping along with the clipping rectangle.
Below is a sample file.
2 2 5 5
3 1 6 4
3 3 4 4
1 5 3 6
3 1 2 6
The first row contains the coordinates of two corners of the clipping rectangle.
The subsequent rows contain the start and end points of different line segments.