Commit Graph

5234 Commits

Author SHA1 Message Date
Jeff Young 862d8ce48d Default TEXT_ATTRIBUTES angles to tenths of a degree, not radians. 2022-01-15 01:30:04 +00:00
Jeff Young 3f98769a77 More EDA_ANGLE.
Includes bug fix for catastrophic error in Add() for converting to
radians.

Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
2022-01-15 01:30:04 +00:00
Seth Hillbrand 22a77d3556 Move EDA_ANGLE to KiMath lib
KiMath should only depend on itself not on other elements in the tree
2022-01-14 17:12:24 -08:00
Jeff Young 93229c37bb Fix compile issue on Mac.
See https://kicad.zulipchat.com/#narrow/stream/216775-core-team/topic/Compile.20error
2022-01-14 20:53:25 +00:00
Jeff Young b3c324b352 Objects on UNDEFINED_LAYER should return an empty layerset.
Fixes https://gitlab.com/kicad/code/kicad/issues/10417
2022-01-14 19:49:39 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Jeff Young 037dfb6e01 Move FP_TEXT::KeepUpright() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young c9487bad18 Move BOARD_ITEM::Rotate() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Seth Hillbrand e7d0318fb2 Plot fonts in outline mode, not triangulated
Putting 1,000s of tiny triangles on a gerber file will cause mfg fits.
Instead, we use easy outline plotting for plots and triangulation for
everything else.
2022-01-13 17:04:14 -08:00
Mark Roszko 3aff953c9c Quietly put the missing [] in the shared_ptr 2022-01-13 13:50:57 +00:00
jean-pierre charras d0f2c20235 Define our kicad font name only once, and do not translate it.
Especially using a translated name breaks kicad config and files because
in non English languages both translated and not translated names were used in code.
2022-01-13 14:32:55 +01:00
Marek Roszko 15dc1b3a38 Remove no longer used boost header 2022-01-13 07:12:13 -05:00
Marek Roszko 9965748795 Use std::shared_ptr in place of boost::shared_array
It works the same here
2022-01-13 07:10:47 -05:00
Jeff Young 6ccfec0553 Layer handling for copper sliver exclusions.
Fixes https://gitlab.com/kicad/code/kicad/issues/10147
2022-01-11 22:28:24 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Ola Rinta-Koski dcab2833b8 PEGTL 2.x->3.x 2022-01-10 23:22:23 +00:00
Seth Hillbrand d5faac7614 Better fix for missing end segment
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed.  Closed will remove
the last segment if it lands on the first point.  We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)

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

(cherry picked from commit 55020c2b89)
2022-01-10 13:39:39 -08:00
jean-pierre charras d42514ad30 Add code and dialog to create/add/remove teardrops, step 1 2022-01-10 20:04:40 +01:00
Jeff Young 236feeb592 Cleanup GRText APIs, 3D Viewer <-> board APIs, and Plotter APIs.
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.

Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 14:17:11 +00:00
jean-pierre charras 72cdba44cb Fix compil issue on c++17/msys2 (and perhaps some other compilers) 2022-01-10 09:15:26 +01:00
Jeff Young 7d032f9c2f Outline font rendering for Cairo, plotter, printer and 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young 78cac128b7 Careful: symbol fonts have no language.
Also a bit of clean up to shut up a false-positive in Coverity (and
clangd) on dereferencing a possibly (not) nullptr.
2022-01-09 11:34:20 +00:00
Jeff Young a4349ae638 Cleanup and error reporting for fonts. 2022-01-09 11:34:20 +00:00
Seth Hillbrand f4d12fb19c Force Mesa to use its own call
Mesa does not support adaptive swapping but will sometimes report that
it does.  This prevents Mesa drivers from testing (and segfaulting) the
limits of their call

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

(cherry picked from commit 100cf757fe)
2022-01-08 17:13:52 -08:00
Marek Roszko 5621e49b21 vcpkg locates ft2build.h in the root of /include and not the freetype2 subfolder 2022-01-08 12:35:40 -05:00
Jeff Young 04c76f10e9 Performance enhancements for fonts. 2022-01-08 16:47:45 +00:00
Jeff Young 438c63f587 Fix outline font boundingbox issues. 2022-01-08 16:47:45 +00:00
Jeff Young aef2a3fca4 Default font for eeschema. 2022-01-08 16:47:45 +00:00
Jeff Young eb58d7e44c Text glyph caches and bug fixes.
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
2022-01-08 16:47:45 +00:00
Jeff Young a2030a5956 GUI for font selection. 2022-01-08 16:47:45 +00:00
Ola Rinta-Koski 9b406c1da4 Outline font support. 2022-01-08 16:47:45 +00:00
jean-pierre charras 9c29cc945c prepare teardrops, round 2 2022-01-08 16:56:41 +01:00
Seth Hillbrand 3a730361d3 Fix swap interval checking
Checking for the existence of the call only validated that our header
defined the value, not that the video card/driver supported the call.
We query the extensions string directly to check for support.  This
should fix both the X11 and virtualization issues (potentially other
crashes with older video cards as well)

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

(cherry picked from commit 7c9340f855)
2022-01-06 10:53:44 -08:00
Ian McInerney bd828f598c Fix compile error with UTF8 unicode wxWidgets build
Fixes https://gitlab.com/kicad/code/kicad/issues/10210
2022-01-05 19:23:30 +00:00
Marek Roszko 5d3609b20b Nix the deprecated binary/unary base class that aren't actually needed
The std::unordered_map custom function objects here don't require inheritance from the deprecated base
2022-01-04 18:58:42 -05:00
Jeff Young cbd665db7b Remove markup_parser from headers so PEGTL doesn't leak windows.h. 2022-01-04 12:20:18 +00:00
Marek Roszko 38a25fbc4d Fix windows compile error
pegtl.hpp is dumb and leaks windows.h which then causes #define conflicts
2022-01-04 00:49:29 -05:00
Jeff Young 8e4a4306c7 Go back to using inter-character spacing from the stroke font.
Fixes https://gitlab.com/kicad/code/kicad/issues/1078
2022-01-04 00:46:08 +00:00
Jeff Young e21fa31f64 Rip out rest of macHack architecture. 2022-01-03 22:09:56 +00:00
Mike Williams 404659d275 Gerbview: Fix diff mode issues with OpenGL transparency
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10121
2022-01-02 23:15:36 +00:00
jean-pierre charras c4af66f6d3 Fix compil issues on Windows+msys2
Probably some fixes also on other platforms
2022-01-02 18:32:39 +01:00
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
Jeff Young e41a4d406a Cherry-pick MARKUP_PARSER from rockola/kicad-strokefont. 2022-01-02 14:57:03 +00:00
Marek Roszko 7d671cff1e Scoop up some more wxPoints 2022-01-01 21:06:40 -05:00
Marek Roszko c91d3e3cf9 Remove some more wxPoint 2022-01-01 14:12:20 -05:00
Marek Roszko ea613cf448 Another batch of point changes 2022-01-01 13:17:12 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00