【发布时间】:2012-11-06 17:44:34
【问题描述】:
我正在绘制如下形状:
- (void)drawRect:(CGRect)rect
{
// Draw a cross rectagle
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextMoveToPoint(context, 190, 0);
CGContextAddLineToPoint(context, 220, 0);
CGContextAddLineToPoint(context, 310, 90);
CGContextAddLineToPoint(context, 310, 120);
CGContextSetFillColorWithColor(context, [UIColor lightGrayColor].CGColor);
CGContextFillPath(context);
CGContextRestoreGState(context);
}
我在下面得到一个明暗的十字旗
现在我想在我刚刚画的十字旗周围画一个笔触
我应该怎么做才能做到这一点。请就这个问题给我建议。 谢谢。
【问题讨论】:
标签: objective-c ios core-graphics drawrect