diff --git a/korge-foundation/src/common/korlibs/math/geom/Rectangle.kt b/korge-foundation/src/common/korlibs/math/geom/Rectangle.kt index 5a43fe6aa2..a302028160 100644 --- a/korge-foundation/src/common/korlibs/math/geom/Rectangle.kt +++ b/korge-foundation/src/common/korlibs/math/geom/Rectangle.kt @@ -32,10 +32,14 @@ data class RectangleD(val x: Double, val y: Double, val width: Double, val heigh val position: Point get() = Point(x, y) val size: Size get() = Size(width, height) - val xD: Double get() = x.toDouble() - val yD: Double get() = y.toDouble() - val widthD: Double get() = width.toDouble() - val heightD: Double get() = height.toDouble() + @Deprecated("", ReplaceWith("x")) + val xD: Double get() = x + @Deprecated("", ReplaceWith("y")) + val yD: Double get() = y + @Deprecated("", ReplaceWith("width")) + val widthD: Double get() = width + @Deprecated("", ReplaceWith("height")) + val heightD: Double get() = height val isZero: Boolean get() = this == ZERO val isInfinite: Boolean get() = this == INFINITE diff --git a/korge-foundation/src/common/korlibs/math/geom/_MathGeom.vector.VectorBuilder.kt b/korge-foundation/src/common/korlibs/math/geom/_MathGeom.vector.VectorBuilder.kt index 9544f714c7..84320f7e85 100644 --- a/korge-foundation/src/common/korlibs/math/geom/_MathGeom.vector.VectorBuilder.kt +++ b/korge-foundation/src/common/korlibs/math/geom/_MathGeom.vector.VectorBuilder.kt @@ -123,7 +123,7 @@ interface VectorBuilder { fun roundRect(rect: RoundRectangle) { val r = rect.rect val c = rect.corners - roundRect(r.xD, r.yD, r.widthD, r.heightD, c.topLeft.toDouble(), c.topRight.toDouble(), c.bottomLeft.toDouble(), c.bottomRight.toDouble()) + roundRect(r.x, r.y, r.width, r.height, c.topLeft, c.topRight, c.bottomLeft, c.bottomRight) } fun roundRect(x: Double, y: Double, w: Double, h: Double, rx: Double, ry: Double = rx) {