draw Top Rounded Rect
Draws a rectangle whose only the top-left and top-right corners are rounded, leaving the bottom edge square.
This is used by SimpleBarChart to cap the topmost non-zero segment of a stacked bar so the stack as a whole appears to have rounded top corners while internal segment boundaries remain flush.
The effective radius is clamped to half the width and to the full height, preventing visual artifacts when the segment is very short or narrow. If either width or height is non-positive the call is a no-op.
Available on all platforms (commonMain); the implementation uses only Compose Multiplatform drawing APIs.
Parameters
Fill color of the rectangle.
X coordinate of the rectangle's left edge in pixels.
Y coordinate of the rectangle's top edge in pixels.
Rectangle width in pixels.
Rectangle height in pixels.
Desired corner radius in pixels; clamped internally to min(radius, height, width / 2).