Clipping rectangle

guys i really need some to help me solve this problem i need the code urgently :slight_smile: 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.

Look at this algorithm. Thats all you need :slight_smile: .

mate … wassup buddy … thnk fo ut time at first i still dont get what clipping is and its all [censored] in my head and i have this question as an assignment and i have to submit it tommorow so if u can solve it for me i would be grateful … and im really sorry for being a burden on u … but im still a beginner and need the help :slight_smile:
thnks again

Best Regards,
30baz

ha ha ha

Dude, if you don’t undestand the basics and just want to get someone else write the code for you, it means you really shouldn’t study computer science. Find a different field.

good luck. tell us how it was