81 Commits

Author SHA1 Message Date
Jeff Young
b64733e76b No hypertext for textboxes. 2025-02-10 16:15:14 +00:00
Jeff Young
6b6729284c Remove default line styles from all items except eeschema wires and buses. 2025-01-20 11:30:46 +00:00
John Beard
520a7cf62c GAL: ViewGetLOD should not be able to change the VIEW
Make the VIEW* parameter const. Since PCB_TEXT does a null-check,
it's not very clear if this can ever be null (and if it is,
why don't the other VIEW_ITEMs check?), so don't make them
all references too at this time.

Also dereference a few pointers a bit earlier to make non-null
promises sooner rather than later.
2025-01-02 22:59:31 +08:00
John Beard
527faddbfd GAL: provide constants for LoD HIDE/SHOW and a scale helper
Saves a mishmash of local HIDE/SHOW defs along with various literals.

Also provide a function that computes the scale at which a given
IU size becomes (notionally) a certain size on screen. While this
is a simple division, it's a bit opaque in terms of meaning.

Also it means the divide by zero case can be more universally
defended-against, which has traditionally been a bug opportunity.
2025-01-02 22:59:31 +08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Seth Hillbrand
e9bc8cfe9d Give Clipper1 a Viking funeral
Clears out the last spot where we were only using Clipper1 (how'd I
miss that?) and remove all calls to the Clipper1 structures
2024-12-23 17:12:09 -08:00
Jeff Young
2926db778c Bug fixes for rotated tables. 2024-12-16 13:26:48 +00:00
Jon Evans
32684decbb API: Move locking to the PCB text objects 2024-11-28 11:48:01 -05:00
Jon Evans
3129e072c4 API: Move graphics and text handling to common
Required moving API_HANDLER_COMMON out of kicommon
2024-11-28 11:28:06 -05:00
Jon Evans
d64b17050d API: Serialize PCB_TEXTBOX 2024-11-24 17:25:56 -05:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
John Beard
215533f31a Unify flip direction handling
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).

Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.

This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
2024-09-27 17:13:13 +01:00
Maciej Suminski
5ad5be0924 Text variable resolving in footprint text boxes
Mostly a code copy from PCB_TEXT::GetShownText() to
PCB_TEXTBOX::GetShownText().
2024-07-08 23:47:16 +00:00
Jeff Young
9d03a92738 Get rid of C++20 compiler warnings. 2024-07-03 13:32:44 +01:00
Jeff Young
aa5a370b3a ADDED: user layer types.
This allows a user to define user layers to be front
or back (and therefore to flip with the board view).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8455
2024-07-03 13:32:44 +01:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Jeff Young
0040c290ed Don't flip alignment of non-side-specific text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18235
2024-06-22 23:54:57 +01:00
Jeff Young
aaf5c454ff Mask new shape properties from textboxes. 2024-06-22 23:54:57 +01:00
Jeff Young
fa0ead98d8 Split out table editing and table cell editing. 2024-02-24 20:05:51 +00:00
Jeff Young
4eefbc7815 ADDED: textbox and tablecell margins.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10672

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6806
2024-02-24 20:05:51 +00:00
Jeff Young
e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Jeff Young
67cd446e6d Add textbox text to description.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16573
2024-02-24 20:05:51 +00:00
Marek Roszko
835500bf1c Hide the color prop from pcb editor 2024-02-05 01:13:16 -05:00
Jeff Young
df83e24eb7 Cleanup.
It's been a long time since line style was specific to plotting.
2023-11-25 13:12:45 +00:00
jean-pierre charras
0904231000 Partial revert of commit d8498b62e0d44442b4e0038ed1fb765a796f0113, due to
comments in PCB_TEXTBOX::TransformShapeToPolygon()
2023-11-11 17:01:01 +01:00
jean-pierre charras
d8498b62e0 PCB_TEXTBOX::TransformShapeToPolygon(): fix incorrect transform: when it
is a polygon (rotated rect by a non cardinal angle) the polygon is not
filled, so the shape is just a set of thick segments.
Fixes #16072
https://gitlab.com/kicad/code/kicad/-/issues/16072
2023-11-11 16:44:04 +01:00
Jeff Young
7788c8f21c Fix textbox mirroring and rotation (again).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15576

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14159

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14912

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14178
2023-11-06 14:03:58 +00:00
Seth Hillbrand
d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Alex Shvartzkop
d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03:00
Jeff Young
8760bd8c80 Reconcile "apply defaults to new footprints" with DRC lib checks.
Moves apply defaults settings to Board Setup (where they were
duplicated anyway due to an earlier botched merge).

Modifies the apply-to-graphics algorithm to skip copper shapes.

Modifies DRC library check to skip STROKE_PARAMS for non-copper
shapes.
2023-10-02 22:10:13 +01:00
Jeff Young
469a94db8c Fix mirroring of TextBox.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15576
2023-09-18 14:49:38 +01:00
Marek Roszko
63824487d0 Hide the unsupported Visible prop for textbox text 2023-09-04 09:28:59 -04:00
Marek Roszko
4b31de61b3 Rename txtbox props to border props 2023-09-04 09:28:59 -04:00
Jeff Young
aacb85bdab Make sure enum gets initialized. 2023-09-01 18:48:46 +01:00
jean-pierre charras
0aaafc92fc Fix a compil issue with gcc created by commit 21c54f97 (gcc only) 2023-08-31 16:21:40 +02:00
Marek Roszko
21c54f9721 Add two more border props to props panel 2023-08-31 07:49:15 -04:00
Marek Roszko
2dcb7caacf Add an explicit border property to textboxes
This means it can remember the last border stroke between enabling/disabling the border
2023-08-30 22:33:55 -04:00
Marek Roszko
cbc60d90ec Add missing line style prop to eda_shape 2023-08-24 22:32:12 -04:00
Marek Roszko
d32b55f504 Minor cleanup after last commit 2023-08-24 21:19:35 -04:00
Marek Roszko
339684263c Fix accidental plotting of disabled textbox borders
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15252
2023-08-24 21:03:48 -04:00
jean-pierre charras
4d1f9f6fb9 Pcbnew: Fix some draw issues in PCB_TEXT and PCB_TEXTBOX:
- fix incorrect ViewGetLayers() layer list.
- fix incorrect color of graphic items (BOARD_CONNECTED_ITEM items) on copper layers
- slightly modify how a PCB_TEXTBOX is drawn on LAYER_LOCKED_ITEM_SHADOW.
Fixes #15458
https://gitlab.com/kicad/code/kicad/-/issues/15458
2023-08-20 17:33:11 +02: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
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
Jeff Young
65e53b8ecd Move SHAPE_POLY_SET::Inflate's error spec from a seg-count to a max-deviation.
1) Also reorders parameters to make sure the compiler helps out.

2) This also makes it harder to mess up the discrepency between
   BOX2I/wxRECT/etc::Inflate() and SHAPE_POLY_SET::Inflate.

3) Also fixes a couple of bugs where the corner strategy was passed
   in as a segCount.

4) Also fixes a couple of bugs where the error wasn't forced to the
   outside to match the ERROR_LOCATION.

5) Also fixes a couple of bugs where the seg count was specified
   without regard to an already passed-in max deviation
2023-05-29 15:29:03 +01:00
Jeff Young
c71cf21e2f Use rendered text to generate bounding box for knockout text.
Don't open-code knockout text shape generation in several different
places.

Make sure triangulated knockout text gets clearance added when
specified.

Collapse duplicated footprint text item plot routine (they're no
longer any different from plotting pcb text items).
2023-05-28 17:20:11 +01: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
Marek Roszko
ea077bc34d Banish ignore.h to core 2023-04-18 22:44:04 -04:00
Jeff Young
bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Jon Evans
eba0783b38 Fix rotation/flipping properties for text boxes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14159
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14164
2023-03-04 13:11:15 -05:00
Jeff Young
8bab429c7d Account for border when calculating text margin for text boxes.
Also fixes some unnoticed issues with the textbox dialogs (probably
dating from the move to wxWidgets 3.2).

Fixes https://gitlab.com/kicad/code/kicad/issues/13877
2023-02-13 17:08:29 +00:00