commonMain.com.aay.compose.radarChart.DrawRadarNets.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chart Show documentation
Show all versions of chart Show documentation
Multiplatform library for desktop and android
The newest version!
package com.aay.compose.radarChart
import androidx.compose.ui.graphics.drawscope.DrawScope
import com.aay.compose.radarChart.model.NetLinesStyle
import com.aay.compose.radarChart.model.RadarChartConfig
internal fun DrawScope.drawRadarNet(
netLinesStyle: NetLinesStyle,
config: RadarChartConfig
) {
val netCornersPoints = config.netCornersPoints
val stepsStartPoints = config.stepsStartPoints
val stepsEndPoints = config.stepsEndPoints
for (endpoint in netCornersPoints) {
drawLine(
color = netLinesStyle.netLineColor,
start = center,
end = endpoint,
strokeWidth = netLinesStyle.netLinesStrokeWidth,
cap = netLinesStyle.netLinesStrokeCap,
)
for (index in stepsStartPoints.indices) {
drawLine(
color = netLinesStyle.netLineColor,
start = stepsStartPoints[index],
end = stepsEndPoints[index],
strokeWidth = netLinesStyle.netLinesStrokeWidth,
cap = netLinesStyle.netLinesStrokeCap,
)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy