Commit Graph

356 Commits

Author SHA1 Message Date
Alex Shvartzkop bce643feae Don't draw LIB_PIN and SCH_LINE on OP layers when OP is empty.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15041
2023-06-24 16:01:58 +03:00
Jeff Young 1c13f5a0db Fix selection shadown drawing for global labels.
(The border should get shadowed, and the shape should get filled if
m_Selection.fill_shapes is set.)
2023-06-23 15:30:09 +01:00
jean-pierre charras 1698fb6608 Refinement of commit 355575e4 (drawing shadow texts of RULER_ITEM and pin names)
Also handle non Kicad fonts (that do not use shadow texts)
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-06-23 10:32:23 +02:00
jean-pierre charras 355575e477 Fix some (minor) issues when drawing shadow texts of RULER_ITEM and pin names.
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-06-22 13:28:43 +02:00
Jeff Young 451b9e20a1 Tighten up layer handling for LIB_SYMBOL.
We have to draw the parent symbol on the union of all layers that
its children might reside on, but we only want to draw each child
on its layers.

And we need to make sure LAYER_PRIVATE_NOTES gets into the layers
order list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13943
2023-06-12 15:38:56 +01:00
Jeff Young 6502787c7a Formatting.
It's annoying to keep searching for "LIB_FIELD*" and come up empty....
2023-06-12 10:48:39 +01:00
Jeff Young b8986709bf Every time I search for SCH_TEXT* it doesn't work.... 2023-05-27 21:25:36 +01:00
Jeff Young f35a88ce0b Cache LIB_PIN text extents for performance.
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.

And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.

Also reverts using the cache for drawing-sheet text.  The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).

And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14822
2023-05-27 16:32:11 +01:00
Jeff Young 6e127829f8 Cleanup formating and includes. 2023-05-26 18:44:33 +01:00
Seth Hillbrand 0de24bfd59 Cleanup text alignment between version 6 and 7
Version 7 text alignment changed subtly for stroke fonts from version 6.
Additionally, the output has been different between screen and plotting,
leading to offset text in plotted output relative to the text shown on
screen.

This introduces a fudge factor in FONT::getLinePositions to correct the
offset in the plotting output relative to v6.

This also changes the SCH_PAINTER and PCB_PAINTER to correct the
relative offsets between GAL and PLOTTER classes.  The source of these
offsets is atm unclear.

Fixes https://gitlab.com/kicad/code/kicad/issues/14755
2023-05-17 13:33:49 -07:00
Mike Williams 5d116245c6 sch_symbol: always require sheet path for text variable resolution 2023-05-06 14:30:06 -04:00
Jeff Young b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Jeff Young e1b39946fe ADDED: show/hide controls for directive labels. 2023-04-28 00:32:49 +01:00
Jeff Young 7e5fedef6a Markup fixes.
1) allow escape sequences inside markup sequences
2) keep overbar when inside nested markup
3) always place overbar at full height, not sub/superscript height

Fixes https://gitlab.com/kicad/code/kicad/issues/14553

Fixes https://gitlab.com/kicad/code/kicad/issues/13449
2023-04-17 17:56:54 +01:00
Jeff Young c9351dfd67 Drawing improvements for symbol & footprint diffs.
Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).
2023-03-11 12:45:16 +00:00
Jeff Young bc0d59801a Graphical diff for schematic vs library symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-09 18:04:52 +00:00
Jeff Young a1ceb585c7 Always highlight children when they're selected on their own.
Fixes https://gitlab.com/kicad/code/kicad/issues/13876
2023-02-28 13:39:07 +00:00
Mike Williams dd461d6ad6 Power Symbols: drop requirement for invisible pins 2023-02-22 18:01:47 +00:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Jon Evans fc68b8d71a Make selected background layers translucent
We can't render them underneath other objects, but we can at least
make it possible to see other objects through them.
2023-02-16 22:45:29 -05:00
Seth Hillbrand a761b0e860 Force DNP X to foreground 2023-02-15 11:35:24 -08:00
Seth Hillbrand 9f8b25a0b0 Don't desaturate the selection shadow
Selection shadows are helpful when showing which elements are selected
and there is no benefit (and some downside) to having their color
removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/13878
2023-02-14 10:22:05 -08:00
Jeff Young be0a9e2738 Handle SPICE prefixes for operating point data.
Also adjusts the min-pin lenght as some symbols have very short pins.
2023-02-13 18:38:43 +00:00
Jeff Young bc108023b3 ADDED operating point overlay for SCH_EDIT_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11253
2023-02-11 21:11:07 +00:00
Jeff Young 2e9ed67e05 Don't dirty connectivity when moving non-reference SCH_FIELD. 2023-02-11 20:43:00 +00:00
Seth Hillbrand 418f8e6f14 Re-add outline shadows to stroke fonts
If we draw using stroke fonts, we can still use the legacy shadow
routine to show nice highlights
2023-01-30 22:42:26 +00:00
Jeff Young 26c821962f Simplify and regularize text variable substitution architecture.
EDA_ITEMs are responsible for giving their parent a crack at it if
they failed to resolve it.  This recurses all the way up to the schematic/
board, and then to the project.

Cross-reference handling is also move to the EDA_ITEMs.  It must be done
before bubbling up so that we don't end up in loops.  (The aDepth parameter
will break the loop, but without having done anything useful.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-17 17:05:41 +00:00
Jeff Young a3a01a87e8 Resolve text variable references in LIB_TEXT and LIB_TEXTBOX.
Fixes https://gitlab.com/kicad/code/kicad/issues/13558
2023-01-16 16:01:45 +00:00
Jeff Young 06a2e950fd Add sheet field layers to SCH_LAYER_ORDER.
Fixes https://gitlab.com/kicad/code/kicad/issues/13518
2023-01-14 20:38:12 +00:00
Seth Hillbrand a206f6717d Desaturate the symbols in DNP for print/plot
The desaturation should match screen display

Fixes https://gitlab.com/kicad/code/kicad/issues/13481
2023-01-11 13:44:08 -08:00
Seth Hillbrand 8a26bf6c41 Tweak DNP display settings
Use ERC error color
Make lines 3 * default line width (instead of 4 *)
2023-01-11 11:29:46 -08:00
Seth Hillbrand f99e374559 Make DNP more visible
Adds red cross to the DNP display.  Allows showing the DNP even when
plotting black/white

Fixes https://gitlab.com/kicad/code/kicad/issues/13456
2023-01-09 15:31:50 -08:00
Mike Williams bd5d10cd7b Schematic: remove more extraneous dangling symbols 2023-01-04 11:07:23 -05:00
Mike Williams b82833200a Schematic: correct bus entry shadows size and selections 2022-12-27 10:09:45 -05:00
Mike Williams 1ad373f2b2 Schematic: don't show unselected ends on bus entries 2022-12-27 09:37:21 -05:00
Jeff Young d0d6dc6ce0 Clang-tidy warnings reduction. 2022-12-22 22:35:09 +00:00
Mike Williams fe01c65794 Schematic Lines: add marker for unselected, connected line ends
Smaller, subtler version of the marking used for unconnected line ends.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13126
2022-12-12 14:45:06 -05:00
Mike Williams 78b5dbead6 Schematic: show partial selection of graphic lines
Use the same inverted-dangling-shadow as regular wires

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13095
2022-12-08 14:12:12 -05:00
Jeff Young adc5c9eb20 OpenGL render order appears to be the inverse of the drawing order.
Fixes https://gitlab.com/kicad/code/kicad/issues/13070
2022-12-04 11:51:44 +00:00
Jeff Young 2dac73e421 Remove dangerous SCH_FIELD::IsVoid() call.
This call didn't differentiate between GetText() and GetShownText() and
was used in instances where the difference matters.
2022-11-03 17:19:59 +00:00
Jeff Young 7f0ebf9e3b Outline font adjustment is only for SCH_TEXT, not labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/12746
2022-10-25 16:51:21 +01:00
Jeff Young cef7cd8f7c Move default font to RENDER_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/12723
2022-10-22 21:32:42 +01:00
Jeff Young 0de540594a Used dimmed setting for pin texts and textbox borders.
Fixes https://gitlab.com/kicad/code/kicad/issues/12705
2022-10-21 22:42:44 +01:00
Jeff Young bad410948d Don't assume text is on LAYER_DEVICE.
Fixes https://gitlab.com/kicad/code/kicad/issues/12707
2022-10-21 22:03:54 +01:00
jean-pierre charras 4611817f25 Eeschema: fix a crash when invoking eeschema.exe with 2 filenames to open
Fix also a minor compil warning
2022-10-04 16:56:13 +02:00
Jeff Young 5fc02a63a3 Use netclass colours for label graphics, text and fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/4984
2022-09-24 23:51:40 +01:00
Marek Roszko 66e8931405 Remove IU_PER_MM thats standalone 2022-09-16 21:09:27 -04:00
Marek Roszko 61e11d6896 Strip out Mils2Iu 2022-09-16 21:09:27 -04:00
Marek Roszko e6ed275c25 Repoint IU_PER_MILS 2022-09-16 21:09:26 -04:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00