Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)
Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
Zones: it turned out that for every zone point, the set of hatch lines
has been drawn, resulting in numerous redundant lines. Now the set is
drawn only once per zone.
Custom shape pads: as GAL supports SHAPE_POLY_SETs, there is no need to
create a temporary vector to copy there a list of points to be drawn.
Changed the drawing calls to use SHAPE_POLY_SETs directly.
Thanks to Andreas Buhr patch, code for drawing filled polygons and their
outlines has been unified. Previously it was done by changing the
drawing method (GAL::DrawPolygon() vs GAL::DrawPolyline()), now it is
done by modifying attributes (stroke/fill).
LAYER_NON_PLATED to LAYER_NON_PLATEDHOLES
LAYER_PADS_HOLES to LAYER_PADS_PLATEDHOLES
LAYER_PADS to LAYER_PADS_TH
and add comments and fix a render issue in gal mode for non plated holes.
SHAPE_POLY_SET: fix crash in VertexCount when it is a empty poly set, or when params are incorrect.
minor other fixes:
warning in degug mode in dialog_dxf_import_base.cpp
pcb_painter.cpp: remove a useless debug line.
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
- support for background color setting
- removed several global config settings (such as g_Drc_On)
- wrapped most of global config settings in PCB_GENERAL_SETTINGS class
- reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
- new GAL feature for legacy users: double-click (or E) to change track width available as an option.
Fixes: lp:1530543
* https://bugs.launchpad.net/kicad/+bug/1530543
Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
If there was a board with no copper layers checked as visible, the
initial GAL cache contained an empty entry for them. In such case,
toggling layers visibility have not changed anything.
The visibility condition check has been moved to ViewGetLOD() method
which serves better the purpose of dynamic visibility checks.
Fixes: lp:1639974
* https://bugs.launchpad.net/kicad/+bug/1639974
Removes the need of using the legacy code in polygon/PolyLine.{h,cpp},
refactoring all CPolyLine instances with SHAPE_POLY_SET instances.
The remaining legacy methods have been ported to SHAPE_POLY_SET;
mainly: Chamfer, Fillet, {,Un}Hatch.
The iteration over the polygon vertices have been simplified using the
family of ITERATOR classes.
This just uses the same hatch lines that are built into the zone as
legacy.
They are always drawn, even when there is a fill, as if the fill
doesn't reach the corners, the hatches can be seen.
Fixes: lp:1487043
* https://bugs.launchpad.net/kicad/+bug/1487043
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas. When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
If a line has zero thickness, use the outline thickness to draw it.
This avoids having invisible items on the PCB that could still end up in
outputs, or "losing" an item by setting thickness to 0.
This only affects GAL drawing routines, the PCB data structures are not
affected, so any outputs will be the same.
Fixes: lp:1501749
* https://bugs.launchpad.net/kicad/+bug/1501749