iphone-common-codes-ccteam源代码 CCGraphics.m

//
// CCGraphics.m
// CCFC
//
// Created by xichen on 11-12-16.
// Copyright 2011年 ccteam. All rights reserved.
//


#import "CCGraphics.h"




@implementation CCGraphics


// 画弧形
+ (void)drawArc:(CGContextRef)ctx
radius:(CGFloat)radius
x:(CGFloat)x
y:(CGFloat)y
startArc:(CGFloat)startArc
endArc:(CGFloat)endArc
clockWise:(int)clockWise
color:(UIColor *)color
{
CGContextMoveToPoint(ctx, x, y);
CGContextAddArc(ctx, x, y, radius, startArc, endArc, clockWise);

CGContextSetRGBFillColor(ctx,
[color getRedValue],
[color getGreenValue],
[color getBlueValue],
[color getAlphaValue]);
CGContextFillPath(ctx);
}




@end

googlecode链接地址(会有更新):http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCGraphics.m

你可能感兴趣的:(graphics)