//
// 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
github地址:https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCGraphics.m
本文介绍了如何使用CCGraphics库中的方法drawArc来绘制弧形,包括参数解释和实例演示。
77

被折叠的 条评论
为什么被折叠?



