Commit Graph

106 Commits

Author SHA1 Message Date
Alex d44a52ceee Make arc endpoint theta consistent with polar coordinate system. 2022-10-07 08:35:14 +03:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Marek Roszko 03aa63bd50 Move 5 helpers to EDA_UNIT_UTILS since they aren't iu specific 2022-08-29 20:11:03 -04:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Alex 6d739ca9da Improve handling of long distances 2022-08-16 12:08:55 +00:00
Seth Hillbrand b792a3f3f5 Add angle display to line drawing
Helpful to see what angle you are at when setting graphic lines
2022-07-15 12:03:11 -07:00
Seth Hillbrand bed38d2fc8 Stroke, don't fill fonts in preview
Fixed new vector-style font display to avoid the non-closed polyline
fills that make it hard to read the proper text

Fixes https://gitlab.com/kicad/code/kicad/issues/11781
2022-07-15 11:58:33 -07:00
Jeff Young f2440978ec Fix some issues with ruler drawing. 2022-02-08 15:59:48 +00:00
Jeff Young d5a2059c21 Error messages for zone merging.
Also fixes a bug where zones meeting at a point would get merged
resulting in a self-intersecting zone.

Also fixes a bug where undo would not be handled correctly when zones
could not be merged.

Fixes https://gitlab.com/kicad/code/kicad/issues/10466
2022-01-21 19:55:57 +00:00
Jeff Young c8a50d9b50 Remove unit-less angles from VECTOR2I/D APIs. 2022-01-20 23:58:20 +00:00
Jeff Young 4a05b36bc6 Prefer EDA_ANGLE to naked radians. 2022-01-20 21:10:04 +00:00
Jeff Young 854987f663 Remove unit-less angles from geometry manager APIs. 2022-01-20 21:10:04 +00:00
Jeff Young 0091c76a6f Excise deci-degrees from UNIT_BINDER.
Fixes https://gitlab.com/kicad/code/kicad/issues/10495
2022-01-19 00:10:32 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Jeff Young 28b279cb2d Units cleanup.
It's 2021.  Time to move beyond ASCII.  This also makes spacing of
units consistent (space before abbreviated units, no space before
symbolic units).
2021-12-23 22:17:10 +00:00
Seth Hillbrand f97c7c78c8 Connect ruler tool with axes preferences
Adds "UpdatePreferences" action that is called when the preferences are
updated, allowing running tools to act on changes that may affect them

Fixes https://gitlab.com/kicad/code/kicad/issues/9737
2021-11-23 12:52:21 -08:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
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
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Jonathan Haas 55679be2e3 Fix some typos across the codebase 2021-04-05 16:15:25 +02:00
Jon Evans 6924b98bc3 Remove deprecated BRIGHT_BOX preview item 2021-03-20 12:09:20 -04:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Wayne Stambaugh 6ab1144ea3 Fix broken Doxygen comment specifiers.
Please note, ///> is not a valid Doxygen comment specifier.  ///< is the
correct specifier to use for single line or short Doxygen comments.
2021-01-25 07:42:36 -05:00
Jeff Young c4117c1ecf Adjust text and shadow offsets for flipped view.
Fixes https://gitlab.com/kicad/code/kicad/issues/6776
2020-12-18 00:30:26 +00:00
Jeff Young 4b2d9a5054 Don't draw ruler ticks outside the viewport.
Fixes https://gitlab.com/kicad/code/kicad/issues/6518
2020-12-02 00:29:00 +00:00
Ian McInerney 308ab8cafa Properly scale the ticks for all imperial units on the preview ruler
Fixes https://gitlab.com/kicad/code/kicad/issues/6564
2020-12-01 01:20:28 +00:00
Jeff Young 17c9f7c61f Cleanup formatting. 2020-11-07 21:21:56 +00:00
Jeff Young f6c17001e4 Formatting 2020-11-04 13:46:51 +00:00
Marek Roszko 12d21e34e2 Remove trigo.h from eda_text.h 2020-10-13 23:37:48 -04:00
Jeff Young b3cd829d9f Don't allow degenerate polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/5883
2020-10-13 20:22:31 +01:00
PJM b263164c72 Pcbnew: Don't flip tool text when view is flipped
CHANGED: When using tools like the ruler, circle, arc, etc, they
display info text.  If the view is flipped, the text is also flipped.
This MR fixes the flipped text and also corrects text X offset and
justification to match normal view.
2020-10-10 22:20:17 +00:00
PJM 6de5cf827a Pcbnew: Don't flip tool text when view is flipped
CHANGED: When using tools like the ruler, circle, arc, etc, they
display info text.  If the view is flipped, the text is also flipped.
This MR fixes the flipped text and also corrects text X offset and
justification to match normal view.
2020-10-10 22:20:17 +00:00
Jeff Young 3fd0df658d Simplify arc drawing guides to be more consistent with other tools. 2020-10-08 11:33:32 +01:00
Jeff Young 70f329df91 Fix two-point assistant drawing layers to be in correct order.
Fixes https://gitlab.com/kicad/code/kicad/issues/5654
2020-10-03 22:55:34 +01:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
Jeff Young 0052954046 Try to make rulers draw right on Cairo as well as OpenGL.
Fixes https://gitlab.com/kicad/code/kicad/issues/5654
2020-10-02 13:50:16 +01:00
Jeff Young 612411a87b Give assistant graphics a max bounding box.
They're only on screen when they're being used, and we don't have
a GAL available to calculate their actual extents from (since their
text scales with zoom).

Fixes https://gitlab.com/kicad/code/kicad/issues/5845
2020-10-01 17:53:44 +01:00
Jeff Young c7802e7ff8 Adjust ruler text on non-HDPI displays.
Fixes https://gitlab.com/kicad/code/kicad/issues/5654
2020-10-01 14:35:30 +01:00
Jeff Young 626bcea8ce Move ruler drawing to the stroke font.
We don't need to be fast, and this allows us to implement drop
shadows for better readability.

Fixes https://gitlab.com/kicad/code/kicad/issues/5654
2020-09-30 20:38:20 +01:00
Jon Evans 56ca842ec4 Fix H/V/45 zone snapping behavior
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5122
2020-09-26 14:27:08 -04:00
Jon Evans 022839a5ae Make ruler a bit easier to see on busy designs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5654
2020-09-23 22:02:21 -04:00
Jeff Young c71bb246e6 Don't allow preview to try and draw empty polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/5314
2020-08-22 23:46:56 +01:00
Thomas Pointhuber 7ba6a77c94 Improve arc geometry manager to choose the direction which makes more sense
As long as the arc angle stays below <60°, it will automatically choose between
clockwise and counter clockwise. This allows the user to choose the direction
with a simple mouse movement.
2020-07-03 15:05:17 +00:00
Seth Hillbrand af064eacdd Silence boost:optional compiler warning 2020-07-02 19:23:58 -07:00
Jeff Young e26625fc99 Scale polygon drawing guides with zoom.
Fixes https://gitlab.com/kicad/code/kicad/issues/4769
2020-07-01 17:32:15 +01:00
jean-pierre charras d714773c22 Fix a minor compil warning. Add a wxASSERT in hierarch.cpp. 2020-01-18 18:23:21 +01:00