You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calling it later with .up will cut-out half of the top border.
Expected behavior
Top border should be properly rendered
Screenshots
I've tracked the issue down to this piece of code in PopTip+Draw.swift (lines 83-88):
// 7: Top left arc
path.addArc(withCenter: CGPoint(x: baloonFrame.minX + radius + borderWidth, y: baloonFrame.minY + radius), radius:radius, startAngle: CGFloat.pi, endAngle: CGFloat.pi * 1.5, clockwise: true)
// 8: Top line
path.addLine(to: CGPoint(x: baloonFrame.width - radius, y: baloonFrame.minY))
// 9: Top right arc
path.addArc(withCenter: CGPoint(x: baloonFrame.width - radius, y: baloonFrame.minY + radius), radius:radius, startAngle: CGFloat.pi * 1.5, endAngle: 0, clockwise:true)
Looks like is not accounting for the borderWidth. The stroke will be applied right in the edge of the path, so half inside of the balloon, half outside. That way, the path should account for the outer part of the border stroke.
From UIBezierPath.fill() docs
The painted region includes the pixels right up to, but not including, the path line itself. For paths with large line widths, this can result in overlap between the fill region and the stroked path (which is itself centered on the path line).
The text was updated successfully, but these errors were encountered:
Describe the bug
By setting a border and showing with
.up
direction will render half of of the top borderTo Reproduce
My settings
calling it later with
.up
will cut-out half of the top border.Expected behavior
Top border should be properly rendered
Screenshots
I've tracked the issue down to this piece of code in PopTip+Draw.swift (lines 83-88):
Looks like is not accounting for the borderWidth. The stroke will be applied right in the edge of the path, so half inside of the balloon, half outside. That way, the path should account for the outer part of the border stroke.
From
UIBezierPath.fill()
docsThe text was updated successfully, but these errors were encountered: