515 Commits

Author SHA1 Message Date
Jeff Young b19f3d6bab Formatting. 2026-03-07 19:28:46 +00:00
Jeff Young 49fc610564 Don't scale hopovers with current wire size.
(Let the user be responsible for a readable schematic.
The real determinant for the hopover size is the wire
being hopped-over anyway.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/23250
2026-02-25 16:54:54 +00:00
Seth Hillbrand fc8c1e2b44 Fix multiline text selection highlight for outline fonts
When selecting multiline text objects with non-default (outline) fonts
in the schematic editor, only a single line-height box was drawn as
the selection highlight. This happened because boxText() called
GetTextExtents() which used StringBoundaryLimits() treating the entire
multiline string as one line, producing a very wide but single-height
bounding box.

Replace the boxText() call with GetBoundingBox() which correctly
computes the bounding box for multiline text by measuring each line
individually and accounting for interline spacing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/23198
2026-02-23 12:05:31 -08:00
jean-pierre charras 24b5de41d8 Symbol field: Fix incorrect position of rectangle shadow of non Kicad fonts
When a field was selected, the position of rectangle shadow of non Kicad fonts
was incorrect for rotated symbols in schematic.
2026-02-16 11:05:47 +01:00
Jeff Young 0f33d13c1c Back out 507ec29cc0.
Apply a more localized fix which doesn't mess up
text positioning.

Also move it to shared code so that it can't get out
of sync with plotting again.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22921
2026-02-03 16:09:48 +00:00
Seth Hillbrand bdab78d1c3 Eeschema: Fix white background on sheet symbols when printing
When printing schematics in color mode, all layer colors are forced to
alpha 1.0 to work around Cairo/PostScript limitations. This caused the
normally transparent LAYER_SHEET_BACKGROUND color to become opaque
white, resulting in white backgrounds being drawn on sheet symbols even
when no explicit background color was set.

The fix checks if the sheet's background color has a visible alpha value
before drawing the fill, matching the behavior of the Plot() function.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18958
2026-01-29 13:08:16 -08:00
Jeff Young daf13adabb Fill in some missing variant code.
In particular:

Resolving the DNP/InBOM/OnBoard/etc. flags needs to take into account
the variant.

Writing a SPICE netlist needs to take into account the variant.

Updating a simulation tuned value needs to write to the current
variant (this is only partly implemented, with a TODO for the hard
part).

Painting of fields needs to paint the current variant value.

Still missing is reading/writing fields from the simulation model
dialog to/from the current variant.
2026-01-28 21:45:20 +00:00
Alex Shvartzkop 8c9f180b30 Change COLOR4D::m_text to shared pointer for memory optimization. 2026-01-24 06:44:51 +03:00
Jeff Young e56805cbd0 Don't let new sub-text URL stuff overwrite text-wide links.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22711
2026-01-15 14:25:19 +00:00
Seth Hillbrand 6a8afd5b19 Fix hatched shape display depending on zoom level
The display of hatched shapes (HATCH, REVERSE_HATCH, CROSS_HATCH fill modes)
would flicker and show missing lines at certain zoom levels.

Fix by properly handling the dirty flag and enforcing a minimum line
width in the painters.  Also changed the drawing function to only draw
with lines.  The cross-hatch optimization is maintained for export, 3d
and hit tests

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20562
2026-01-08 11:06:43 -08:00
Seth Hillbrand 465207df4a Prevent crash when updating to lower pin count
When iterating, we need to check if our index is valid for both new and
old symbols

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22566
2026-01-04 06:23:02 -08:00
Jeff Young e2150517b5 Don't draw DNP cross more than once.
(It keeps adding to the final opacity if you do.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22595
2025-12-31 13:06:22 +00:00
Jeff Young f04e674a96 Don't crash when there's no schematic. 2025-12-31 12:53:10 +00:00
Jeff Young 5c42107e1c Partial URLs for SCH_TEXT objects. 2025-12-31 12:49:37 +00:00
Wayne Stambaugh ca0bfe0bba More schematic variant work.
Everything in the variant handling should be working with the exception of
the job handling and command line interface.
2025-12-30 11:11:33 -05:00
Jeff Young c1a98c7dd5 Rewrite url handling for non-atomic objects.
This allows multiple urls to be in a single textbox.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22444
2025-12-22 12:14:59 +00:00
Seth Hillbrand d94d2c9a05 Don't copy embedded files for temp objects
Just takes a long time and we throw it away a ms later

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22547
2025-12-18 13:06:27 -08:00
Jeff Young 728590e2d7 Allow evaluation of text for colors. 2025-12-15 20:58:35 +00:00
Jeff Young c4b72c386a Formatting. 2025-12-15 16:38:43 +00:00
Jeff Young 64de4d5c65 Formatting. 2025-12-02 13:00:16 +00:00
Jeff Young 161697d81c Cleanup. 2025-11-14 15:17:35 +00:00
Jeff Young 16ca38ed4a Improve signal-to-noise in the code. 2025-11-14 15:17:35 +00:00
Jeff Young e094a3d34a Naming conventions and simplification. 2025-11-09 21:19:54 +00:00
jean-pierre charras 6bd1303322 Eeschema: fix minor issues when drawing the "Local Power" icon near symbol value.
Also add the plot function needed to plot this icon

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22095
2025-10-25 17:40:03 +02:00
Wayne Stambaugh fddb8f9e5a Coding policy fixes. 2025-10-24 13:59:46 -04:00
Jeff Young ce6d6cd5b2 Don't depend on a global MaxError value.
It can't handle multiple IUScales.
2025-10-23 17:43:29 +01:00
Jeff Young cf0adbb1dc Hatched fills get their own color.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22016
2025-10-17 23:04:07 +01:00
Seth Hillbrand 8eed37ec63 Fix missing headers 2025-10-14 16:37:49 -07:00
Seth Hillbrand ac8914e46e ADDED: Ability to create flat-type schematics
Allows multiple, top-level schematic sheets.  Records of the sheets are
stored in the project file.  All top-level sheets live under a virtual
root sheet in the hierarchy.  This virtual root is suppressed for export
and general visibility

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2063
2025-10-14 16:07:44 -07:00
Jeff Young 507ec29cc0 Adjust text offset after SCH_/LIB_ merger.
(It was upside down as it originated
from the flipped coordinate system.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21802
2025-10-14 11:14:38 +01:00
Jeff Young 7de10641be Don't print dangling pin indicators.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21805
2025-09-29 18:57:46 +01:00
Wayne Stambaugh 33ead34ea5 Work in progress variant code commit.
Please do not attempt to use this yet as it is a work in progress.  Given
large number of merge conflicts, I pushed this partial commit to save time
rebasing.

All of the user interface is hidden behind the "EnableVariantUI" advanced
configuration flag until variants are ready.
2025-09-26 08:54:08 -04:00
Seth Hillbrand 5fdfff2b9c Prevent lines from drawing on netclass layer
Only wires and busses get netclasses

Fixes https://gitlab.com/kicad/code/kicad/issues/21731
2025-09-13 02:51:00 -07:00
Seth Hillbrand f66cbaf43a ADDED: Stacked pin notation support
Implement bracket notation for stacked pins ([1,2,3], [1-4], [1,3,5-7]).
Automatic net naming proceeds based on the smallest logical pin number
in stacked groups.

Provide explode/reform commands in symbol editor for conversion.
Supports arbitrary ranges including BGA alphanum ranges like
[AA1-AA3,CD14-CD22]

Adds some additional QA and trace logging

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2004
2025-09-07 14:59:51 -07:00
jean-pierre charras 5b31b11731 SHAPE_RECT: add Normalize method to assure width or height > 0
ROUNDRECT: add option to normalize the rectangle on creation

if the created rectangle has a negative size(width or height) there are issues
when drawing it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21613
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21610
2025-09-01 11:56:56 +02:00
Seth Hillbrand 8acf5c1a25 ADDED: Rounded Rectangles
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4742
2025-08-29 17:37:30 -07:00
Seth Hillbrand 50c7aff3ff Simplify KiROUND using std::llround/clamp
Removes the bespoke rounding in favor of std::llround and std::clamp
routines
2025-08-04 09:26:25 -07:00
Jeff Young e230d5164d Honour renderSettings' default font.
This still leaves a few things out in the cold,
such as hit-testing and polygon generation.
But at least it allows us to plot with a default
font.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19031
2025-07-17 09:35:21 +01:00
jean-pierre charras b8d2bdb3d2 EEschema: avoid DNP and EXCLUDE from SIM markers blinking when moving an object
They were redrawn multiple times, and not always on the right graphic layer, thus
creating draw artifacts.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20483
2025-07-07 17:00:29 +02:00
jean-pierre charras 33c9a50afd Fix typo in last commit 2025-06-19 09:03:05 +02:00
jean-pierre charras 92934b2178 Eeschema: fix crash (null pointer) in Preferences->Colors panel.
When drawing items shown in this panel, the <item>->Schematic() is nullptr
so we cannot use it.
2025-06-19 08:53:13 +02:00
Jeff Young 2cd6654e81 Hop-over improvements.
1) Move hop-over enablement to Schematic Setup.
2) Make hop-over size user configurable.
3) Prefer hop-overs to hop-unders.
2025-06-18 22:18:59 +01:00
jean-pierre charras 025317ee10 Eeschema, hop over arc: refinement in draw code (arcs always have the right radius). 2025-06-17 18:53:38 +02:00
jean-pierre charras cd206a62ba Eeschema: hop over arcs: ensure they are drawn not filled. 2025-06-16 08:53:38 +02:00
jean-pierre charras ca9df9986a Make show hop over a configurable option 2025-06-15 16:55:18 +02:00
jean-pierre charras 57bbc96ab2 Make BuildWireWithHopShape() a member of SCH_LINE
BuildWireWithHopShape(): fix incorrect code, and plot Hop Over shapes
2025-06-15 16:54:54 +02:00
Dhineshkumar S f650999004 Eeschema: Add option to show unconnected wire crossings as hop-overs. 2025-06-15 16:53:40 +02:00
Mike Williams fa02c70604 schematic: draw groups 2025-04-15 09:59:38 -04:00
Jeff Young 5e61a5193f Fix misleading cast. 2025-03-21 13:49:07 +00:00
Jeff Young 59e77e977e Don't use net/netclass colors for label graphic shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19589
2025-03-20 13:52:21 +00:00