createStarPath
import { createStarPath, Path } from "@pibbl/core";StarPathOptions is accepted by createStarPath(options): Path2D, which validates integer points and
nonnegative inner/outer radii, then returns a fresh concave star outline. It is
pure and owns no render state, event target, or cache.
<Path style={{ d: createStarPath({ points: 5, outerRadius: 54, innerRadius: 24 }), fill: "#f59e0b", }}/>Try the Star live example.
API details from source
Section titled “API details from source”
Creates a Canvas Path2D for star geometry from validated options.
createStarPath: (options: Readonly<StarPathOptions>) => Path2DRelated API: createStarPath, StarPathOptions.
Parameters
Section titled “Parameters”options— Star center, inner and outer radii, point count, and rotation. See StarPathOptions .
Returns
Section titled “Returns”A native Canvas path containing the star.
See also
Section titled “See also”View source — packages/core/src/lib/geometry/star.ts:130
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Drawing, layout, and effects companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Polygon path factories: Create rounded rectangles and polygons alongside regular and star shapes. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 2dccb19. ALPHA — NOT FOR PRODUCTION USE.