Commit Graph

371 Commits

Author SHA1 Message Date
Alex Shvartzkop 10e2e4a12d Another try at fixing arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Jeff Young a7dc720271 Batch undo for Convert To...
Also repairs drawing of dangling symbols for global labels.
2023-08-07 18:38:48 +01:00
Alex Shvartzkop 717ee350c8 Support >180 deg arcs in schematic. 2023-08-07 14:18:38 +03:00
Jeff Young 5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
jean-pierre charras 8649a3e340 Eeschema: fix position of shadow shape of graphic texts in a footprint.
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-08-03 13:55:48 +02:00
Jon Evans 148e111579 Refactor pin orientation to be an enum class
Add various LIB_PIN properties
2023-07-26 23:46:15 -04:00
jean-pierre charras a16ab0aae1 Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name
issue with a Windows header on msys2.
Change very similar to the commit 9a47b344 about class PAD_SHAPE.
No actual code change
2023-07-25 09:11:55 +02:00
jean-pierre charras 58a9b75883 Eechema: Do Not Place markers: add a specific setting for their color.
Previously, the color was the ERROR ERC marker color.
Now they have a specific color.
2023-07-16 20:46:30 +02:00
Jeff Young eaa3543d67 Beautify DNP symbols.
Make sure the 'X' is centered over the body, not the body + pins.
2023-07-16 19:18:24 +01:00
Jeff Young 89e2cb0b85 Use loaded colours for DNP symbol.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15203
2023-07-16 18:35:05 +01:00
Jeff Young 12ed015174 Fix selection highlighting of heirarchical labels and sheet pins. 2023-07-08 18:50:04 +01:00
Jeff Young 5bca002567 Swap non-temp and non-edit flags for SCH_ITEMs.
This is required to keep selected and brightened state across undo.

It's also probably required for things like IS_SHOWN_AS_BITMAP and
possibly ENTERED.  FWIW, most BOARD_ITEMs do a straight swap, including
the temp and edit flags.  But that seems like a risky change....

Also removes SyncView() call from Undo/Redo as that does a MODEL_RELOAD
which clears the selection.
2023-07-08 18:37:47 +01:00
Jeff Young c8e8b71198 TestDanglingEnds needs to test sheet pins as well.
Also fixes a bug where zooming doesn't get a redraw until mouse moves.

Also fixes a couple of bugs where dangling markers on SCH_SHEET_PINs
and SCH_HIERLABELs weren't getting drawn.

Also simplifies drawing algorithm by removing aesthetic offset (which
wasn't implemented when pin is drawn as part of selection VIEW_GROUP).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15129
2023-07-08 12:55:45 +01:00
Jeff Young 29d2265c01 Clean up dead code. 2023-06-26 20:51:58 +01:00
Jeff Young 40fcfe891d Move pinnumber above pins if pinnames aren't shown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14998
2023-06-25 16:01:35 +01:00
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