jjzjj

CGContextMoveToPoint

全部标签

ios - 为什么当线本身加倍时连接不四舍五入?

我有以下代码:-(void)drawRect:(CGRect)rect{CGContextRefc=UIGraphicsGetCurrentContext();CGContextSetFillColorWithColor(c,[UIColorblackColor].CGColor);CGContextFillRect(c,rect);CGContextSetLineJoin(c,kCGLineJoinRound);CGContextSetLineCap(c,kCGLineCapRound);CGContextSetLineWidth(c,50.0);CGContextSetStroke

ios - 为什么当线本身加倍时连接不四舍五入?

我有以下代码:-(void)drawRect:(CGRect)rect{CGContextRefc=UIGraphicsGetCurrentContext();CGContextSetFillColorWithColor(c,[UIColorblackColor].CGColor);CGContextFillRect(c,rect);CGContextSetLineJoin(c,kCGLineJoinRound);CGContextSetLineCap(c,kCGLineCapRound);CGContextSetLineWidth(c,50.0);CGContextSetStroke