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.
Junctions should only be wire endings when ending directly on the wire.
This is the requirement for netlisting, so we need to follow it in the
auto-end as well.
SCH_LABEL needs to allow ending because any wire that touches the label
will be connected, so there's a use case for this. However, the
bounding box for local labels did not include their connection point, so
we increase that box a bit. Note that this might have the opposite
effect to https://gitlab.com/kicad/code/kicad/-/issues/7689
Fixes https://gitlab.com/kicad/code/kicad/issues/7714
CHANGED: If you set the auto-increment value to a negative number,
created a net label and hit the insert key, when the name got below zero,
the net labels tried to go negative but created bad labels instead.
Now the code caps decrementing at zero, warns users when it has
happened, and explains why.
Fixes https://gitlab.com/kicad/code/kicad/issues/6537
Rotate text using the Rotate90() function which gets the orientation
right.
Also, when calculating the center point for rotation, don't include
labels if the selection contains other stuff. It just makes the
rotation odd, and tends to cause walking when continuing to rotate
(due to keep-upright being non-symmetrical).
Fixes https://gitlab.com/kicad/code/kicad/issues/git
1) Generalize SCH_ITEM owners (SCH_COMPONENT, SCH_SHEET, and now
SCH_GLOBALLABEL)
2) Generalize hypertext items
3) Use SCH_FIELD autoplace infrastructure for placing intersheet
references
4) Use textVar infrastructure for buildin intersheet references.
As an important side-effect this also fixes the undo issues with
intersheet refs.
Also improves the SNR and consistency of the menu item text. For
instance, a position is rarely useful, while relative sizes can be.
Also removes some unnecessary repitition, such as "Graphic Rectangle"
when "Rectangle" communicates the necessary information.
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of. Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
Texts were drawn with a minimal line thickness = GetDefaultPenWidth().
The default pen width can be to large for small texts.
So the actual text thickness is now always clamped.
Unlike the global labels, the hierarchical label is not inside the graphic symbol.
So the graphic symbol size depends only of the text size, not of the text offset.
Don't try to use complex algorithms taking into account default
margins, line-widths and pen-widths (especially when they differed
between label types). We now use the (user-controlled) text
offset ratio to determine the margins (from the center-point of
the attached line).
The RTree does not have a deterministic iterator, so extracting items
may be in arbitrary order, causing issues as the schematic appears to
change when comparing to previous revisions.
This uses the SCH_ITEM comparison operator to for ordering by type, then
by custom sorting within type.
For the netlist, we choose the first available unit in the sheet for
each component.
Fixes#3811 | https://gitlab.com/kicad/code/kicad/issues/3811
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE
Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
This moves EESchema DLIST structures to rtree. These changes are more
fundamental than the pcbnew changes from 9163ac543888c01d11d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
"INPUT" declaration in sch_text.h generate *a lot of* compil warnings.
So it is replaced by PS_INPUT.
For consistency, others member of enum class PINSHEETLABEL_SHAPE are also renamed.
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.
Note that since the markup might exist for other reasons, it has
to be turned on with a preference setting. (It goes through a set
of bitflags so the same architecture can be used for other markup
structures that we might want to support in the future.)
Note also that this is more about engineering nomenclature than
visual formatting. In that respect it's more similar to overbar
than italic or bold.
The spin style is stored as a numeric and can be corrupted. We handle
this by triggering assertions for debugging the bad value while
resetting to default if we have non-valid spin values that are outside
the array.
Fixes: lp:1843091
* https://bugs.launchpad.net/kicad/+bug/1843091
This adds the functionality to add multiple labels to your schematic at
once by using spaces in the original label name.
Fixes: lp:1095113
* https://bugs.launchpad.net/kicad/+bug/1095113
Save and restore text thickness in SCH_TEXT::Plot() function to prevent
the plotting default thickness value from stepping on the original text
thickness and causing all of the text objects to magically change to bold.
Fixes lp:1823165
https://bugs.launchpad.net/kicad/+bug/1823165
Bus upgrades: core new connectivity code
Bus upgrades: eeschema integration and modifications
Bus upgrades: eeschema dialogs
Bus upgrades: netlist export
Bus upgrades: file format changes
Spacing text for plotters uses the thickness of text for two separate
classes. This sets the thickness in the EDA_TEXT class as well to allow
the multiple line positions to be correctly set
Fixes: lp:1799605
* https://bugs.launchpad.net/kicad/+bug/1799605
No dangling symbol for text items with a NO-CONNECT.
DanglingStateChanged doesn't work with dangling flag aggregators
(which return true if any child is dangling).
Then again, we don't actually use any of the aggregators anyway
so I removed them.
Fixes: lp:1799589
* https://bugs.launchpad.net/kicad/+bug/1799589
5.0 doesn't set the GAL's line width. It gets away with this since
it's using the same GAL to measure as to set up the drawing, so
the width happens to be set correctly for other reasons. 5.1 uses
a separate GAL and so isn't so lucky.
... and GetMsgPanelInfo.
Step 4 in the g_UserUnit eradication effort.
Also removes a couple of conversion routines that were close
enough to extinction.
(cherry picked from commit c75da51)
Be consistent with order, formatting, etc.
Remove debug stuff such as zone timestamp and net code.
Clean up misleading pad messages.
(cherry picked from commit 2132109)
All of the schematic object load and save code is implemented in the
legacy schematic plugin so it is no longer required.
Remove unused file with old schematic file loader.
Doxygen comment cleaning.
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.
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h
Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.
This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.
The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.
Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.
Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.
Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.