BerkeleyHCI / edg-ide

BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

Wire colors for voltage lines #127

Closed ducky64 closed 1 year ago

ducky64 commented 1 year ago

Adds ATX-style color coding to the block diagram visualizer for VoltageSink, VoltageSource ports and VoltageLink edges. Supports ~3.3v (orange), ~5v (red), ~12v (yellow), GND (blue). Colors are somewhat muted (67% blend with foreground color). The specifics of the visuals probably need fine-tuning, but that's for another day and another PR.

VoltageSink ports are only colored if the voltage is restricted to the range. Wider tolerances (common on many parts) will not be color-coded.

Wire drawing also changed to a polyline, which should eliminate overlap artifacting for outlines.

Other refactoring: