I would like to draw a line and rectangle in my iPhone application, for that i want to used structure concept to draw line and rectangle.In strut shall i want to be struct line { float X1; float Y1; float X2; float Y3; color of line draw line function };
And similarly in case of rectangle. struct rect { float left X1; float top Y1; float Right X2; float Bottom Y2; color of rectangle; drawRect()//function of draw rectangle };
How i will have to be create the perfect structure for drawing rectangle and lines?