Given a rectangle with a series lines intersecting it, how would you calculate the points of each individual shape created? In this particular application that we are working on, the user can "slice" a rectangle into sub-shapes, similar to how Adobe Illustrator's scissors tool works. Programmatically speaking, I can do the interaction part and drawing, but I'm unsure how to calculate the shapes. The rectangle will always be a fixed size and users cannot plot a point that is not on the main rectangle's sides.
EDIT:
Not really looking to get the area of each of the shapes shown in the diagram (A, B, C, etc). What I would to solve is this: given the points that define each dotted line, I want to find the points that define each created shape. So (in the drawing) area is defined by A=(0,0),(0,1),(1,0); B=(0,1),(0,3),(1,3),(2,0),(1,0); and so on. I know the size of the rectangle is 5x4 and that will never change, only a series of lines that the user can create by tapping two points on the rect, thereby slicing a section in two for each line.