/** * RoundedRectangle * * A rectangle with circular corners, the radius clamped to half the short * side as SwiftUI clamps it. Per-corner radii are a later addition; the * options object is the form that leaves room for them. */ import type { Shape } from '@tachui/types/shapes'; import { type ShapeInstance, type ShapeLength } from './ShapeComponent'; export interface RoundedRectangleOptions { cornerRadius: ShapeLength; } /** * The `Shape` for a rounded rect of `cornerRadius`. * * A radius is read at draw time rather than captured, so a signal stays live * the way `.inset()` and a stroke's line width do. * * That holds for `path` because `paint()` calls it inside the renderer's * subscription. `clipPath()` carries no such guarantee of its own — it * simply reads the radius when called — but `clipShape` applies its modifier * in a tracked scope, so the clip follows the signal too and stays in step * with the drawn path. Only a caller reading `clipPath()` outside a tracked * scope gets a snapshot. This is the first shape whose `clipPath()` depends * on state at all. */ export declare function roundedRectangleShape(cornerRadius: ShapeLength): Shape; /** * A rounded rectangle that fills its frame. * * ```ts * RoundedRectangle(12).fill(color) * RoundedRectangle({ cornerRadius: 12 }).strokeBorder(tint, 2) * RoundedRectangle(radiusSignal).fill(color) * ``` * * The radius is clamped to half the short side, so a value larger than the * frame draws a capsule rather than distorting into elliptical corners. */ export declare function RoundedRectangle(cornerRadius: ShapeLength | RoundedRectangleOptions): ShapeInstance; //# sourceMappingURL=RoundedRectangle.d.ts.map