2010-04-25 86 views

回答

2

只需在绘制路径之前使用CGContextSetShadow(context, offset, blur)即可。

CGSize offset; 
float blur; 
offset.width = 10; 
offset.height = -10; 

CGContextSetShadow(context, offset, blur); 
CGContextRect(context, CGRectMake(20, 20, 100, 100); 
+0

这是行不通的。尽管我可以设法画一条简单的线,但它根本不会模糊。 – dontWatchMyProfile 2010-04-25 21:46:08