Skip to content

Commit

Permalink
documenting CWCreateCGColor()
Browse files Browse the repository at this point in the history
  • Loading branch information
Machx committed Feb 16, 2012
1 parent 687d02f commit 686dd62
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/CWGraphicsFoundation.m
Expand Up @@ -94,6 +94,15 @@ void CWSaveAndRestoreCGContextState(CGContextRef ctx, void(^block)(void))
CGContextRestoreGState(ctx);
}

/**
Easy way to Create a CGColorRef using the Device RGB Colorspace.
@param r a CGFloat representing the red component of the CGColorRef
@param g a CGFloat representing the blue component of the CGColorRef
@param b a CGFloat representing the green component of the CGColorRef
@param a a CGFloat representing the alpha component of the CGColorRef
@return a CGColorRef object created with the components specified in the parameters, you must release this object when done with it
*/
CGColorRef CWCreateCGColor(CGFloat r, CGFloat g, CGFloat b, CGFloat a)
{
CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB();
Expand Down

0 comments on commit 686dd62

Please sign in to comment.