Changes a dot to be a square pixel (linewidth x linewidth). This allows
the removal of IU dependencies and ensures that a dot is always visible
on screen. Also makes sure that cairo is setting the current linewidth
during its stroke routines
Fixes https://gitlab.com/kicad/code/kicad/issues/9362
Previously, the count of segments used a magic number optimized for Pcbnew.
This is not good, and does not work well on Gerbview.
The count uses now a max error acceptable is approximation (5 microns in Gerbview and Pcbnew).
Fixes#9101https://gitlab.com/kicad/code/kicad/issues/9101
curl.h has constraints on Windows (because it includes winsocks2.h) and must be
included before any wxxxx.h.
Because only very few files need curl.h, kicad_curl.h is included only in these files
Fix the valgrind warning from the use of an uninitialized
member variable by setting the DEFAULT value for
m_currentNativeCursor in the constructors member initializer list.
This fixes the following warning caused by the SetNativeCursorStyle
method call later on the constructor.
==66660== Warning: client switching stacks? SP change: 0x1ffeffee40 --> 0xdf7efe8
==66660== to suppress, use: --max-stackframe=137187819096 or greater
==66660== Conditional jump or move depends on uninitialised value(s)
==66660== at 0x13F0764E: UnknownInlinedFun (graphics_abstraction_layer.cpp:276)
==66660== by 0x13F0764E: KIGFX::GAL::GAL(KIGFX::GAL_DISPLAY_OPTIONS&) (graphics_abstraction_layer.cpp:78)
Error can be reproduced and checked from the log.txt
by launching kicad with valgrind command
"valgrind --leak-check=full kicad > log.txt 2>&1"
and then launching the footprint editor from the kicad main dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8784
Signed-off-by: Mika Laitio <lamikr@gmail.com>
The max-char-width impl was buggy and never applied to PCBNew anyway.
Plus the stroke font has a max-char-width of 2.8 time the space width,
so it made for really wide tab spacing.
Also fixes a bug where the Scintilla editors weren't getting a
monospace font on Mac. (This bug may also exist on the other
platforms, but each would need its own fix.)
Also moves more of the Scintalla customizations to SCINTILLA_TRICKS
where they can be shared.
Fixes https://gitlab.com/kicad/code/kicad/issues/8666
Reduce each (Accel & Fallback) to 3 options: Off, Fast, Good. Fast AA
in accelerated canvas uses SMAA with tweaks suggested by David Beinder.
Good AA is super-sampled x2.
Cairo is similarly reduced to Off, Fast, Good, which map to the Cairo
options themselves. Best is removed as it mostly affects text rendering
and not line drawing (as our text is)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8522
Conservative makes SMAA usable in Eeschema through weaker AA.
Aggressive reduces some artifacts compared to the High preset.
Restores the unused Ultra preset in the shader source to its original state.
Avoid fractional pixel offsets by forcing integer division of m_screenSize.
Shift rounded lookAtPoint onto OpenGL pixel center to ensure consistent rounding to int.
The pixel 0..1 @ 1x needs to fill the area 0..2 @ 2x so its center moves by 0.5 * (pixel size @ 1x).
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
Initialized COLOR4D takes an EDA_COLOR_T enum but then referenced it as
an index to the color table. This uses the enum as comparison against
the table-stored enum.
Adds standard orange to picker swatches
VIEW::GetBoundary() returns the entire view area, not the visible area.
Surprisingly, we had no API for this, so I added one.
Also, changed the dragger behavior to toggle between optimizing just the
modified area and optimizing the visible area, i.e. we will now never
optimize off-screen portions of the dragged track.
The native cursor must be set on the GAL canvas wx object,
not its frame (otherwise on GTK the cursor is only set
when we get a request for it from the WM and not immediately).
Fixes https://gitlab.com/kicad/code/kicad/issues/6421