fix arc rendering
This commit is contained in:
parent
e7784c2960
commit
ce25690dfb
@ -10,7 +10,7 @@ val kmathVersion: String by extra("0.3.1-dev-10")
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "center.sciprog"
|
group = "center.sciprog"
|
||||||
version = "0.2.2-dev-3"
|
version = "0.2.2-dev-4"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
@ -15,7 +15,6 @@ import center.sciprog.attributes.plus
|
|||||||
import org.jetbrains.skia.Font
|
import org.jetbrains.skia.Font
|
||||||
import org.jetbrains.skia.Paint
|
import org.jetbrains.skia.Paint
|
||||||
import space.kscience.kmath.geometry.degrees
|
import space.kscience.kmath.geometry.degrees
|
||||||
import kotlin.math.PI
|
|
||||||
|
|
||||||
|
|
||||||
internal fun Color.toPaint(): Paint = Paint().apply {
|
internal fun Color.toPaint(): Paint = Paint().apply {
|
||||||
@ -57,8 +56,8 @@ public fun <T : Any> DrawScope.drawFeature(
|
|||||||
|
|
||||||
drawArc(
|
drawArc(
|
||||||
color = color,
|
color = color,
|
||||||
startAngle = (feature.startAngle.degrees / PI * 180).toFloat(),
|
startAngle = (feature.startAngle.degrees).toFloat(),
|
||||||
sweepAngle = (feature.arcLength.degrees / PI * 180).toFloat(),
|
sweepAngle = (feature.arcLength.degrees).toFloat(),
|
||||||
useCenter = false,
|
useCenter = false,
|
||||||
topLeft = dpRect.topLeft,
|
topLeft = dpRect.topLeft,
|
||||||
size = size,
|
size = size,
|
||||||
|
Loading…
Reference in New Issue
Block a user