From ce25690dfb7a09af2d396230a270a9f0723a23d6 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Mon, 13 Feb 2023 11:13:00 +0300 Subject: [PATCH] fix arc rendering --- build.gradle.kts | 2 +- .../kotlin/center/sciprog/maps/features/drawFeature.kt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 36afbba..ea2e732 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ val kmathVersion: String by extra("0.3.1-dev-10") allprojects { group = "center.sciprog" - version = "0.2.2-dev-3" + version = "0.2.2-dev-4" repositories { mavenLocal() diff --git a/maps-kt-features/src/jvmMain/kotlin/center/sciprog/maps/features/drawFeature.kt b/maps-kt-features/src/jvmMain/kotlin/center/sciprog/maps/features/drawFeature.kt index ea6d2c6..3677577 100644 --- a/maps-kt-features/src/jvmMain/kotlin/center/sciprog/maps/features/drawFeature.kt +++ b/maps-kt-features/src/jvmMain/kotlin/center/sciprog/maps/features/drawFeature.kt @@ -15,7 +15,6 @@ import center.sciprog.attributes.plus import org.jetbrains.skia.Font import org.jetbrains.skia.Paint import space.kscience.kmath.geometry.degrees -import kotlin.math.PI internal fun Color.toPaint(): Paint = Paint().apply { @@ -57,8 +56,8 @@ public fun DrawScope.drawFeature( drawArc( color = color, - startAngle = (feature.startAngle.degrees / PI * 180).toFloat(), - sweepAngle = (feature.arcLength.degrees / PI * 180).toFloat(), + startAngle = (feature.startAngle.degrees).toFloat(), + sweepAngle = (feature.arcLength.degrees).toFloat(), useCenter = false, topLeft = dpRect.topLeft, size = size,