When building the connectivity database, we should not be using the
connectivity to check for shapes.
To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not. ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal. If they are not marked for removal,
they will be checked ALWAYS_FLASHED.
Fixes https://gitlab.com/kicad/code/kicad/issues/11114
(cherry picked from commit 442aae19d9)
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
IsLayerVisible() is patched to always return true when printing
(even when "print according to appearance settings" is checked, and
that's too risky to change at this point. So we also look to see
if the layer colour is set to the background colour.
Fixes https://gitlab.com/kicad/code/kicad/issues/8548
The angle was `-angle` instead of `180 deg - angle` when flipping top to
bottom.
Fixing that, in turn, created some problems with justification, which
was modified both by `FP_TEXT::Flip()` and `FP_TEXT::KeepUpright()`.
What's worse, `FP_TEXT` has another mechanism for keeping the text
upright: `FP_TEXT::GetDrawRotation()` returns different angles if the
"keep upright" flag is set. But there is no analogous behavior for
justification, so the text would sometimes get shifted, and sometimes
not, depending on which mechanism was engaged. And both are used,
apparently.
Clearly, such an arrangement an open invitation to bugs and
inconsistencies. One of these mechanisms should be removed. I haven't
done this yet, and would prefer to postpone this until V6 is out.
I've fixed the justification problems, but this was by trial-and-error,
and I don't feel I really understand the behavior responsible. But I
think it's a good sign that most of my changes are line removals, not
additions. Flipping is a simple operation, it's just mirroring and layer
change. If something simple has a complicated routine, then it's
probably full of hacks.
Fixes https://gitlab.com/kicad/code/kicad/issues/7289
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.