Factor out save current canvas view to image file code from symbol editor
code so it can be used anywhere.
Add ability to save to any image format supported by wxBitmapType. See
https://docs.wxwidgets.org/3.0/gdicmn_8h.html#a90a1eb6d85b5044a99b706fd979f27f5.
Currently only PNG output is implemented.
Please note that there is a minor bug that appears to be due to the
scroll bars which causes unfilled areas on the right and bottom edges
of the image. This always existed in the save symbol editor view
image but it was not as noticeable because by default the background
color is white. It is very noticeable in the footprint editor with
a black background.
The usual smattering of coding policy and comment fixes.
Fixes lp:1802127
https://bugs.launchpad.net/kicad/+bug/1802127
If checkboxes don't have individual IDs FormBuilder won't assign
them and the event table ends up connecting each checkbox to all
of the checkbox handlers in the dialog.
Fixes: lp:1801746
* https://bugs.launchpad.net/kicad/+bug/1801746
Importing Eagle files allowed for invalid zone values for clearance and
minimum width that triggered asserts in the 3d-viewer.
Fixes: lp:1801188
* https://bugs.launchpad.net/kicad/+bug/1801188
Fedora packaging errors with ambiguous python shebang since current
rawhide (30).
So we should remove it as the footprint wizards are not to be executed
standalone.
Variable netBuffer contains all NET_INFO items, whereas max_netcode
value is determined only basing on pad nets. After a netlist update
there still might be a NETINFO_ITEM that is not assigned to any pad and
has a net code higher than calculated max_netcode. Such situation
results in a out-of-bounds access in sortNetsByNodes().
Separate out zone edges (which are quite specific, and should
win over most other things) from zone fills (which are pretty
generic and should only be considered when there's nothing else).
Also excludes zone fills when the zones aren't being shown as
filled.
Display GALs had an incorrect world unit value set. Now the world unit
value says how many internal units are in an inch, in accord with the comments
in the GAL header. Bitmap drawing code relied on the information about DPI,
so scaling worked differently for display and print GALs.
It is possible for an async thread to simply be deferred if not
specifically set to async. In which case, until the return value is
requested, the loop may simply wait.
By decoupling from std::thread, we can avoid the wait/sleep cycle in
checking the std::atomic completion variable. The std::future variables
are immediately returning without the additional atomic check cycle.