fix arc rendering

This commit is contained in:
Alexander Nozik 2023-02-13 11:13:00 +03:00
parent e7784c2960
commit ce25690dfb
2 changed files with 3 additions and 4 deletions

View File

@ -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()

View File

@ -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 <T : Any> 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,