https://kotlinlang.org logo
n

Nick

02/16/2021, 12:46 AM
Doodle 0.4.2 released • New helpers for creating paths for circlesrings, and ring-sections
Copy code
val ring   : Path = ring       (center, innerRadius, outerRadius)
val section: Path = ringSection(center, innerRadius, outerRadius, startAngle, endAngle)
• New PathProgressIndicatorBehavior that lets you create progress indicators by outlining a path
Copy code
object: ProgressIndicator() {
    init {
        size     = Size(200, 100)
        progress = 0.25
        behavior = PathProgressIndicatorBehavior(
            pathMetrics,          // injected
            path                = path("M10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80")!!,
            foreground          = LinearGradientPaint(Black, Blue, Origin, Point(width, 0.0)),
            foregroundThickness = 5.0,
            background          = Lightgray.paint,
            backgroundThickness = 5.0
        )
    }
}
• New BasicCircularProgressBehavior to replace the old with more flexibility/configurability • Updated BasicCircularSliderBehavior so it can have Fills instead of just Colors and exposed thickness • BasicProgressBarBehavior now takes an optional background Fill, configurable outline thickness, foreground and background corner radii • Stroke can now be filled with any supported Paint, instead of just 
Color
, and now support dash offset
Copy code
canvas.rect(rectangle = bounds.atOrigin.inset(10.0),
            radius = 10.0,
            stroke = Stroke(fill = LinearGradientPaint(Red, Green, Origin, Point(width, height)), thickness = 20.0))
See the full release notes for more details. Posted in #doodle
🔥 2