| 65 | } |
| 66 | |
| 67 | void BorderRadius::applyToPath(const Rect& bounds, Path& path) const { |
| 68 | Scalar radii[8]; |
| 69 | |
| 70 | Scalar sizeRatio = sideLengthForPercentages(bounds) / 100; |
| 71 | |
| 72 | populateBorderRadius(&radii[0], sizeRatio, _topLeft, _topLeftIsPercent); |
| 73 | populateBorderRadius(&radii[2], sizeRatio, _topRight, _topRightIsPercent); |
| 74 | populateBorderRadius(&radii[4], sizeRatio, _bottomRight, _bottomRightIsPercent); |
| 75 | populateBorderRadius(&radii[6], sizeRatio, _bottomLeft, _bottomLeftIsPercent); |
| 76 | |
| 77 | path.addRoundRect(bounds, radii, true); |
| 78 | } |
| 79 | |
| 80 | bool BorderRadius::operator==(const BorderRadius& other) const { |
| 81 | return _topLeft == other._topLeft && _topRight == other._topRight && _bottomRight == other._bottomRight && |
no test coverage detected