Skip to content

Intermact API Reference / @intermact/core / rectangle

Function: rectangle()

rectangle(props): IMObject2D

Defined in: packages/core/src/geometry/primitives.ts:137

Build a filled, morphable rectangle of width×height centered at center (design.md §5.1). A positive cornerRadius rounds the corners with arc segments (clamped to half the shorter side); samples controls corner smoothness.

Parameters

props

RectangleProps

Returns

IMObject2D

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)