fillRing

fun Canvas.fillRing(cx: Int, cy: Int, iradius: Float, oradius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)

Draws a filled ring on the canvas, in between two radii.

Parameters

cx

The X coordinate of the ring center

cy

The Y coordinate of the ring center

iradius

The inner radius of the ring

oradius

The outer radius of the ring

startAngle

The starting angle of the ring in degrees

endAngle

The ending angle of the ring in degrees

segments

The number of segments to use for drawing the ring (more segments = smoother ring, typically >= 6)

color

The color of the ring