Commit Graph

118 Commits

Author SHA1 Message Date
Jeff Young 40b4052ad4 Improve text hittesting in schematics.
Text has a fairly big bounding box to account for descenders, overbars,
etc., but it makes it feel too sloppy for hittesting.  This change
allows selection disambiguation to look at the actual strokes of the
text when deciding what's "closest".

Fixes https://gitlab.com/kicad/code/kicad/issues/9506
2021-11-01 21:13:12 +00:00
Wayne Stambaugh 1f7fd436a2 Move board object polygon code into the object source files.
Having the board object polygon code all defined in a separate file made
finding the polygon code for an object difficult to find.
2021-10-25 17:42:11 -04:00
Jeff Young b52529521e Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01:00
Jeff Young a41944020d Push most of PCB_SHAPE impl down in to EDA_SHAPE. 2021-10-15 12:45:43 +01:00
Jeff Young cef5792e78 Formatting. 2021-09-27 10:34:32 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh 89b1fdabe9 Pass COLOR4D object by reference instead of on the stack. 2021-07-26 13:28:56 -04:00
Wayne Stambaugh bcd6bddfd4 Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
Jeff Young fb4343bc8f Expand text bounding boxes a bit for diacriticals, descenders, etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/8551
2021-06-20 23:22:56 +01:00
Jeff Young 74cefecaac Add legacy empty-string token handling to EDA_TEXT. 2021-06-13 12:11:01 +01:00
Mikolaj Wielgus 3d520ebe1e Replace `~...~` overbar syntax with `~{...}`
Fixes https://gitlab.com/kicad/code/kicad/issues/8134

Fixes https://gitlab.com/kicad/code/kicad/issues/4227
2021-06-11 18:40:57 +00:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Roberto Fernandez Bautista 9148542219 CADSTAR Schematic: Fix Text Positioning within Symbols 2021-04-12 20:25:03 +01:00
Mikolaj Wielgus c3c3649211 Stop text from causing a shift during flip when >1 items are selected
1e1be730 fixed this only for one item.

Fixes https://gitlab.com/kicad/code/kicad/issues/7304
2021-03-15 21:24:16 +00:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Dominik Wernberger 07635d2fc7 Minor adjustments 2021-01-12 20:51:31 +00:00
Dominik Wernberger ec0af24f13 Make wxFindReplaceData argument const 2021-01-12 20:51:31 +00:00
Dominik Wernberger bb2881a5ab Make RENDER_SETTINGS argument const 2021-01-12 20:51:31 +00:00
Jeff Young 896ad4a749 Rewrite PCBNew selection disambiguation based on shapes.
The new shape architecture gives us the opportunity to make text
selection much more intuitive by actually looking at the glyph
shapes.  Before text would be selected when you clicked in the
descenders area (which was usually blank given uppercase letters
and digits).

Fixes https://gitlab.com/kicad/code/kicad/issues/6525
2020-11-27 22:03:14 +00:00
jean-pierre charras 064ebd4dc8 Minor fix for include files. 2020-11-23 11:43:22 +01:00
qu1ck b32c2a6c90 Refactor EDA_TEXT::TransformToSegmentList() to return a vector of points
This allows reading text object as it is rendered through python API.
2020-11-23 07:50:54 +00:00
Jeff Young 812b714ccd More Module -> Footprint and a bit of formatting cleanup. 2020-11-10 20:53:12 +00:00
Jon Evans 52cb410952 Cannot use two layers of temporary in range-for (yet)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6244
2020-10-31 15:13:30 -04:00
Werni a7d5d1f091 Add more consts all over the place 2020-10-27 11:03:35 +00:00
Marek Roszko 68484e9b38 Nix some global richio.h 2020-10-24 08:44:03 -04:00
Jeff Young ebc8e2c921 Move property manager tokens to HKI macro.
This leaves them untranslated internally but makes sure their
translation strings exist so they can be dynamically translated
at the GUI level.

Fixes https://gitlab.com/kicad/code/kicad/issues/6020
2020-10-16 16:59:52 +01:00
Marek Roszko b9f1601418 Rename PLOT_MODE to OUTLINE_MODE 2020-10-15 19:33:18 -04:00
Marek Roszko eb33c33f15 Rename EDA_DRAW_MODE_T to PLOT_MODE 2020-10-15 19:30:07 -04:00
Marek Roszko f59551d6ad Remove painter.h from eda_text.h 2020-10-14 19:18:38 -04:00
Marek Roszko b2e9f6987d Split base_struct into eda_item and eda_rect 2020-10-13 21:24:50 -04:00
Jeff Young cc617b715f Implement hypertext links for intersheet references. 2020-10-02 21:18:34 +01:00
Tomasz Wlostowski 9b470b6c09 EDA_TEXT: Use actual draw rotation angle to generate the effective shape.
Fixes: #5814
2020-10-01 18:55:53 +02:00
Jeff Young d402d93487 Implement shape routines for DIMENSION_Ts.
This allows them to participate in DRC and PNS.

Fixes https://gitlab.com/kicad/code/kicad/issues/5712
2020-09-19 14:16:00 +01:00
Tomasz Wlostowski 6358995ff8 EDA_TEXT: rename GetEffectiveShape() to GetEffectiveTextShape() to avoid name aliasing with BOARD_ITEM inteface 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski 7dbd8ef802 EDA_TEXT: implement GetEffectiveShape() 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski c1d5394e46 properties: post-rebase fixes 2020-07-05 22:44:38 +02:00
Maciej Suminski a289056a9e Properties meta-data for pcbnew classes 2020-07-05 22:44:38 +02:00
Jeff Young 301ac3461c Fix some more pen width issues from global removal.
Fixes https://gitlab.com/kicad/code/kicad/issues/4408
2020-05-12 15:20:17 +01:00
jean-pierre charras 687c2f3e82 eeschema: fix a readability issue for small texts.
Texts were drawn with a minimal line thickness = GetDefaultPenWidth().
The default pen width can be to large for small texts.
So the actual text thickness is now always clamped.
2020-04-30 09:38:23 +02:00
jean-pierre charras 4f369801f2 Fix a few compil and Coverity warnings. 2020-04-25 08:49:16 +02:00
Jeff Young 2fb2eac4d5 Performance enhancements. 2020-04-24 22:17:45 +01:00
Jeff Young fbd68722b2 Fix a couple of problems with text stroke thickness. 2020-04-21 21:17:59 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Jeff Young d7d1cb6f78 A bunch of fixes to Eeschema Find/Replace. 2020-04-18 14:43:08 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
jean-pierre charras 04ea20dd44 Eeschema, SCH_PAINTER: fix max text thickness issue, to have small texts readable. 2020-04-14 11:08:42 +02:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young 41b5872f12 Add ERC & DRC checks for unresolved variables. 2020-03-30 14:15:59 +01:00
Mark Roszko ca34ade00c Make global labels have the same spin style as net/hierarchical labels
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
2020-01-08 19:07:55 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00