Skip to content

Instantly share code, notes, and snippets.

@projectxcappe
Created August 26, 2011 20:05
Show Gist options
  • Save projectxcappe/1174300 to your computer and use it in GitHub Desktop.
Save projectxcappe/1174300 to your computer and use it in GitHub Desktop.
// Draw a point (filled circle)
CGContextFillEllipseInRect(context, CGRectMake(xVal, yVal, 5, 5));
CGFloat red[4] = {1.0f, 0.0f, 0.0f, 1.0f};
CGContextSetFillColor(context, red);
//----- AXIS
CGFloat white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
CGContextSetStrokeColor(context, white);
CGContextBeginPath(context);
//Vert Line
CGContextMoveToPoint(context, 25, 25);
CGContextAddLineToPoint(context, 25, 275);
//Horiz Line
CGContextMoveToPoint(context, 25, 275);
CGContextAddLineToPoint(context, 275, 275);
CGContextStrokePath(context);
//----- END AXIS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment