CR: simplify

pull/1/head
Michael Kirk 7 years ago
parent b301dba4ba
commit 40df1c8c3f

@ -161,16 +161,13 @@ const CGFloat kOWSMessageCellCornerRadius_Small = 2;
CGFloat bottomRounding
= (useSmallCorners_Bottom ? kOWSMessageCellCornerRadius_Small : kOWSMessageCellCornerRadius_Large);
const CGFloat topAngle = 3.0f * M_PI / 2.0f;
const CGFloat topAngle = 3.0f * M_PI_2;
const CGFloat rightAngle = 0.0f;
const CGFloat bottomAngle = M_PI / 2.0f;
const CGFloat bottomAngle = M_PI_2;
const CGFloat leftAngle = M_PI;
[bezierPath moveToPoint:CGPointMake(bubbleLeft + topRounding, bubbleTop)];
// top line
[bezierPath addLineToPoint:CGPointMake(bubbleRight - topRounding, bubbleTop)];
// top right corner
[bezierPath addArcWithCenter:CGPointMake(bubbleRight - topRounding, bubbleTop + topRounding)
radius:topRounding
@ -178,9 +175,6 @@ const CGFloat kOWSMessageCellCornerRadius_Small = 2;
endAngle:rightAngle
clockwise:true];
// right line
[bezierPath addLineToPoint:CGPointMake(bubbleRight, bubbleBottom - bottomRounding)];
// bottom right corner
[bezierPath addArcWithCenter:CGPointMake(bubbleRight - bottomRounding, bubbleBottom - bottomRounding)
radius:bottomRounding
@ -188,9 +182,6 @@ const CGFloat kOWSMessageCellCornerRadius_Small = 2;
endAngle:bottomAngle
clockwise:true];
// bottom line
[bezierPath addLineToPoint:CGPointMake(bubbleLeft + bottomRounding, bubbleBottom)];
// bottom left corner
[bezierPath addArcWithCenter:CGPointMake(bubbleLeft + bottomRounding, bubbleBottom - bottomRounding)
radius:bottomRounding
@ -198,9 +189,6 @@ const CGFloat kOWSMessageCellCornerRadius_Small = 2;
endAngle:leftAngle
clockwise:true];
// left line
[bezierPath addLineToPoint:CGPointMake(bubbleLeft, bubbleTop + topRounding)];
// top left corner
[bezierPath addArcWithCenter:CGPointMake(bubbleLeft + topRounding, bubbleTop + topRounding)
radius:topRounding

Loading…
Cancel
Save