void CGContextAddRect (
CGContextRef c,
CGRect rect
);
example:
// start at origin
CGContextMoveToPoint (c, CGRectGetMinX(rect), CGRectGetMinY(rect));
// add bottom edge
CGContextAddLineToPoint (c, CGRectGetMaxX(rect), CGRectGetMinY(rect));
// add right edge
CGContextAddLineToPoint (c, CGRectGetMaxX(rect), CGRectGetMaxY(rect);
// add top edge
CGContextAddLineToPoint (c, CGRectGetMinX(rect), CGRectGetMaxY(rect));
// add left edge and close
CGContextClosePath (c);