Skip to content

fix(svg): paint transparent component fills first - #142

Merged
ShiboSoftwareDev merged 1 commit into
tscircuit:mainfrom
KrishnaX12:fix/schematic-transparent-paint-order
Sep 6, 2026
Merged

fix(svg): paint transparent component fills first#142
ShiboSoftwareDev merged 1 commit into
tscircuit:mainfrom
KrishnaX12:fix/schematic-transparent-paint-order

Conversation

@KrishnaX12

@KrishnaX12 KrishnaX12 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prioritize transparent component fills (e.g. background boxes) behind opaque symbol graphics (e.g. diode polygons, windings).
  • Preserve existing pin-label paint ordering so pin text remains on top.
  • Update affected schematic snapshot tests.

Context

In Altium schematics, component body boxes (such as RECORD=14 rectangles with TRANSPARENT=T and filled background AREACOLOR) may appear after symbol primitives or pins in the record stream. Previously, these late filled graphics were painted over opaque symbol graphics (like diode triangle fills), obscuring the component symbols.
This change separates transparent background fills from opaque foreground graphics, ensuring background boxes are painted first behind symbol graphics while preserving foreground and pin-label paint order.

Visual Comparison: Altium 365 (Reference) vs altium.tscircuit.com

1. RJ45 Connector with Integrated Magnetics (J9)

Altium 365 (Reference) altium.tscircuit.com
Altium 365 Reference altium.tscircuit.com

2. Component Box & Diode Symbol (D11 / D8)

Altium 365 (Reference) altium.tscircuit.com
Altium 365 Reference altium.tscircuit.com

Testing

  • bun test tests/svg/schematic-component-paint-order.test.ts
  • bun test --max-concurrency=1
  • bun run typecheck
  • bun run format:check
  • bun run build

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

@KrishnaX12 is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

@KrishnaX12
KrishnaX12 force-pushed the fix/schematic-transparent-paint-order branch from 1471d73 to dd483c6 Compare September 6, 2026 17:23
@ShiboSoftwareDev
ShiboSoftwareDev merged commit baddaec into tscircuit:main Sep 6, 2026
5 of 6 checks passed
@vreview

vreview commented Sep 7, 2026

Copy link
Copy Markdown

Video review

Failed — the review could not finish. Tag the bot in a new comment to retry. The operator can inspect the job logs.

Reviewing commit dd483c6f.

This comment updates as work progresses.

Job: 1317762139-issue_comment-5571882600

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.

3 participants