A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.
There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.
Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
We fake the alpha channel by pre-multiplying but we forgot to account
for the downscaling of the input channel value in addition to correcting
the alpha * white. This led to clipping when the values overflowed
Fixes https://gitlab.com/kicad/code/kicad/issues/14238
The userToDeviceCoordinates helper returns a VECTOR2D
Converting it to VECTOR2I back and forth is a bug and generates rounding errors
Cherry picked from stable branch
Old PLOTTER::Text is not (yet) removed, but it use negative text size
to mirrored text, which is not really compatible with some plotters (especially PDF).
Using TEXT_ATTRIBUTES is much easy and much better,
so PLOTTER::PlotText() is added.
Note: "old" PLOTTER::Text() is not removed yet.
Rather than hiding a single line at once, we align each word in the
string with the approximate location of the output word. This allows
better selecting text in the output pdf
Fixes https://gitlab.com/kicad/code/kicad/issues/12159
It might make sense to do that with board and/or schematic items for
hit-testing or something, but it definitely doesn't make any sense for
the drawing sheet border.
Also, when reading in items with a transparent fill, treat them as
unfilled (otherwise we get filled with layer colour in at least PCBNew).
Using arc angles to plot an arc is really error prone due to different
options between plotters, and angles defined in Kicad, using this version of
arc plotting from Kicad is no longer allowed in Kicad code.
Arcs are really error prone, due to different Y axis orientation, and geometry transforms.
Probably we should remove plot and print functions using arc angles as parameters
that are a can of worms.
Fixes#12465https://gitlab.com/kicad/code/kicad/issues/12465
(Not sure if it solves the MSW issues yet, but at least it highlights
the items in the dropdown on rollover on OSX.)
Also added some text to the dropdown menu for intersheet references in
the PDF.
Also moves most navigation code to SCH_NAVIGATION_TOOL.
Also changes page number href to anchor syntax ('#foo').
Also adds hypertext processing to SCH_TEXTBOXes.
Also adds combobox with schematic pages to text properties dialog.
The problem is that "real" page numbers can be duplicated, so we work around it
by using virtual page numbers instead which are guaranteed unique.
Example "goto:3" will go to page 3. If customised page numbers are used such as
a, b, c, then to go to page b, we should specify goto:2 (i.e. the virtual page
number).
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
The start/end point plotting is not reliable for eeschema. We need to
preconvert to angles to get the correct winding as the default plotter
conversion in the PLOTTER class makes pcbnew-based assumptions
Fixes https://gitlab.com/kicad/code/kicad/issues/11885
Depending on plotter type and pad type, the plotted shapes were not always the outlines,
but a outline inside the pad shape (due to legacy reasons).
In many cases the plotted shape was in fact incorrect.
(only noticeable for very small pads)
Now the actual pad outlines are plotted without modification.
Fixes#11484https://gitlab.com/kicad/code/kicad/issues/11484
CHANGED: The text variable ${SHEETNAME} now always represents the name of the
sheet when used anywhere in the schematic editor, including the title block
ADDED: A new text variable ${SHEETPATH} which is replaced with the path to the
current sheet - e.g. "/Sheet 1/Sheet 2".
To ensure backward compatibility, the default drawing sheet now uses
${SHEETPATH}. Custom drawing sheets will need to be manually edited.
Only SVG can actually handle transparency, but we should at least mimic
the color value of other transparent fills by blending with a (presumed)
white paper.
Fixes https://gitlab.com/kicad/code/kicad/issues/11304
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes#11196https://gitlab.com/kicad/code/kicad/issues/11196
It avoid trying to calculate arc angles (start, end or arc angle) that
frequently create issues due to reverse Y axis, plot mirrored and/or
angle normalization with different criteria.
Fixes#10914https://gitlab.com/kicad/code/kicad/issues/10914
Also fixes some plot bugs with arcs.
Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5017
Use 4 digits in mantissa as default and when exporting SVG.
Allow 0 as line width: this is the right value to draw filled shapes with no outline thickness.
Putting 1,000s of tiny triangles on a gerber file will cause mfg fits.
Instead, we use easy outline plotting for plots and triangulation for
everything else.
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
This one is primarily about pushing TEXT_ATTRIBUTES in to the GAL
API, but it also includes adding EDA_ANGLE signatures to some trig
routines to ease integration.
Also converts HPGL line types to fixed (rather than adaptive). Varying
the pattern to fit each segment is going to look bad most of the time,
but particularly when stroking arcs or circles where HPGL will try to
repeat it for each chord segment.
ADDED arc, circle and rectangle shapes for schematic. Shapes support
line styles and fill colors.
CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).
Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
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
Unused variables in function calls can be commented out. Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.