Skip to content

Commit ace5600

Browse files
authored
Swaps bottomLeft and bottomRight in roundRect(RectCorners) to match clockwise ordering expected by the main roundRect overload. (#4)
Currently, constructing RectCorners with expected arguments (such as feeding to Container.roundRect in korge) swaps the rounding on the bottom two corners.
1 parent 58eb74d commit ace5600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

korlibs-math/src/korlibs/math/geom/_MathGeom.vector.VectorBuilder.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ interface VectorBuilder {
123123
fun roundRect(rect: RoundRectangle) {
124124
val r = rect.rect
125125
val c = rect.corners
126-
roundRect(r.x, r.y, r.width, r.height, c.topLeft, c.topRight, c.bottomLeft, c.bottomRight)
126+
roundRect(r.x, r.y, r.width, r.height, c.topLeft, c.topRight, c.bottomRight, c.bottomLeft)
127127
}
128128

129129
fun roundRect(x: Double, y: Double, w: Double, h: Double, rx: Double, ry: Double = rx) {

0 commit comments

Comments
 (0)