Skip to content

Add SVG component support#387

Open
Gujiassh wants to merge 1 commit into
nodegui:masterfrom
Gujiassh:codex/svg-support-issue-31
Open

Add SVG component support#387
Gujiassh wants to merge 1 commit into
nodegui:masterfrom
Gujiassh:codex/svg-support-issue-31

Conversation

@Gujiassh
Copy link
Copy Markdown

Adds an initial SVG component implementation for React NodeGui.

What changed:

  • Adds a <Svg> host component that serializes SVG-like child components to SVG XML and renders through QPixmap.loadFromData.
  • Adds basic SVG nodes: <G>/<Group>, <Rect>, <Circle>, <Ellipse>, <Line>, <Polygon>, and <Path>.
  • Exports the new components from the package entrypoint.
  • Documents a minimal SVG usage example in the README.

This follows the initial MVP approach discussed in #31: generate an SVG string from React components and render it as an image. Prop updates regenerate the SVG image.

Validation:

  • ./node_modules/.bin/tsc --noEmit --pretty false
  • git diff --check

Note: yarn install --frozen-lockfile could not complete the @nodegui/nodegui Qt download in this environment due a TLS ECONNRESET, but the TypeScript dependencies were present and static validation passed.

/claim #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant