// // MGMPath.m // VoiceMob // // Created by Mr. Gecko on 10/1/10. // Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ // #import "MGMPath.h" @implementation MGMPath + (MGMPath *)path { return [[[self alloc] init] autorelease]; } + (MGMPath *)pathWithRect:(CGRect)theRect { MGMPath *path = [self path]; CGPathAddRect([path CGPath], NULL, theRect); return path; } + (MGMPath *)pathWithRoundedRect:(CGRect)theRect cornerRadius:(CGFloat)theRadius { return [self pathWithRoundedRect:theRect cornerRadiusX:theRadius cornerRadiusY:theRadius]; } + (MGMPath *)pathWithRoundedRect:(CGRect)theRect cornerRadiusX:(CGFloat)theRadiusX cornerRadiusY:(CGFloat)theRadiusY { MGMPath *path = [self path]; float maxRadiusX = theRect.size.width / 2.0; float maxRadiusY = theRect.size.height / 2.0; theRadiusX = (theRadiusX