Suppress and resolve warnings

This commit is contained in:
Edwin Jakobs
2023-12-06 16:08:17 +01:00
parent a9b59a435a
commit 077f316b15
75 changed files with 152 additions and 14 deletions

View File

@@ -15,8 +15,8 @@ fun Circle.contour(segments: Int): ShapeContour {
val p = Polar(0.0, radius)
moveTo(center + p.cartesian)
for (i in 1 until segments+1) {
val p = Polar(i * 360.0/segments, radius).cartesian + center
arcTo(radius, radius, 360.0/segments, false, true, p.x, p.y)
val lp = Polar(i * 360.0/segments, radius).cartesian + center
arcTo(radius, radius, 360.0/segments, false, true, lp.x, lp.y)
}
close()
}

View File

@@ -7,7 +7,7 @@ import org.openrndr.shape.contour
* Create a contour from a list of contours
*/
fun ShapeContour.Companion.fromContours(contours: List<ShapeContour>, closed: Boolean, connectEpsilon:Double=1E-6) : ShapeContour {
val contours = contours.filter { !it.empty }
@Suppress("NAME_SHADOWING") val contours = contours.filter { !it.empty }
if (contours.isEmpty()) {
return EMPTY
}