jean-pierre charras
51d46c0e73
plotters rework: add plot fct to use TEXT_ATTRIBUTES class to pass text settings
...
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.
2023-02-26 14:44:53 +01:00
jean-pierre charras
f14e24d2cf
PDF_plotter: fix crash when the font used to plot texts is not specified.
...
(In this case the default Kicad font must be used)
Fixes #13615
https://gitlab.com/kicad/code/kicad/issues/13615
2023-01-21 20:12:30 +01:00
Seth Hillbrand
da1707d5ba
Place hidden PDF text behind words better
...
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
2023-01-19 15:53:46 -08:00
Jeff Young
be142af4d0
Another attempt at string encoding for JS inside a PDF.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12782
2022-11-06 14:34:54 +00:00
Jeff Young
1b93b8c51b
Fix JS to support more Acrobat versions.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12819
2022-11-03 17:19:59 +00:00
Jeff Young
a2679f62cd
Enormous hack to deal with JS encoding issues in PDF.
...
No, PDFDocEncoding (as spit out by encodeStringForPlotter()) does
not seem to work.
Fixes https://gitlab.com/kicad/code/kicad/issues/12782
2022-10-29 22:03:52 +01:00
Jeff Young
d37526ba42
Don't stroke outline font polygons, even with a really narrow pen.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12739
2022-10-25 11:58:25 +01:00
Wayne Stambaugh
598b09821a
Coverity fixes.
2022-10-17 15:30:20 -04:00
Seth Hillbrand
863184e3dc
Ensure node count is signed
...
Fixes a broken commit from a0865082fb
2022-10-07 08:14:53 -07:00
Seth Hillbrand
a0865082fb
Fix compile warnings
2022-10-04 17:06:45 -07:00
Marek Roszko
8f52821cd4
Add missing clear of children memory in outline node
2022-09-25 08:47:28 -04:00
jean-pierre charras
7c44dbd9d6
Fix gcc compil warnings.
2022-09-25 11:01:25 +02:00
Marek Roszko
0595efd0a7
Make the page outline nodes goto page...
2022-09-24 23:37:55 -04:00
Marek Roszko
209e1b2086
Add naming of the outline page entries
2022-09-24 22:54:38 -04:00
Marek Roszko
a381a0acb2
Generalize bookmarks to support additional groups and names
2022-09-24 22:35:20 -04:00
Marek Roszko
6f8205235f
ADDED: Add outline support to schematic PDF and PCB plot
2022-09-24 21:45:48 -04:00
Jeff Young
b80824951e
Clean up some of the PDF hypertext stuff, and add opening HTTP[S] urls.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12153
2022-09-06 13:59:52 +01:00
Jeff Young
8afc1db7a6
Property popups for symbols, labels, sheets, and footprints in PDF.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5521
2022-09-06 13:59:52 +01:00
Jeff Young
95fd7cb80a
Move wxComboBox to wxBitmapComboBox in hopes it will work better.
...
(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.
2022-08-28 12:05:27 +01:00
Jeff Young
c0d2052e4b
PDF hypertext menus for intersheet references.
2022-08-27 23:58:13 +01:00
Jeff Young
122a6d7f46
Move hypertext linking to user-page-numbers.
...
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.
2022-08-27 19:17:43 +01:00
Roberto Fernandez Bautista
9b007ca4bf
ADDED: Go to page hyperlinks in schematic editor (virtual page numbers)
...
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).
2022-08-27 19:17:42 +01:00
Roberto Fernandez Bautista
3cd867e656
WIP - add hyperlinks to pages within pdf
2022-08-27 19:17:42 +01:00
Roberto Fernandez Bautista
f788945cf4
Add pdf output to hyperlinks
2022-08-27 19:17:42 +01:00
Roberto Fernandez Bautista
366b0ab08b
Fix variable naming in pdf plotter
2022-08-27 19:17:42 +01:00
Jeff Young
dbbdc9d2e6
Don't rely on the penWidth already being set when setting the dash style.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11908
2022-06-29 07:34:45 -06:00
jean-pierre charras
3ef397b4bd
PDF plotter: fix a not working PDF_PLOTTER::Arc() function.
2022-04-29 10:53:31 +02:00
Jeff Young
079d4a603a
Improve transparency handling while plotting.
...
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
2022-04-08 11:40:53 +01:00
Jeff Young
c6a8100d46
Schematic and symbol text boxes.
...
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
2022-01-28 21:38:15 +00:00
jean-pierre charras
810a49ef1b
Fix broken PDF plotter for arcs.
2022-01-26 20:15:17 +01:00
Jeff Young
fbab335128
Retire DPOINT and DSIZE.
2022-01-20 21:10:04 +00:00
Jeff Young
e61144d45a
Finish with EDA_ANGLE.
2022-01-16 21:15:40 +00:00
Jeff Young
9b661aea10
EDA_ANGLE for plotters.
...
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Mark Roszko
44dc602d6b
Yeet wxPoint/wxSize out of PLOTTER
2021-12-29 19:02:50 +00:00
Jeff Young
ccb94fd1a7
APIs for passing KIFONT::FONT pointers around.
...
Also some clean-up and bug fixes.
2021-12-29 17:32:19 +00:00
Jeff Young
86cb57f4a7
Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont
2021-12-28 22:15:20 +00:00
Jeff Young
295a6408c3
User-configureable dash styles (and dash-dot-dot).
...
ADDED: Schematic Setup properties for dash length and gap length.
ADDED: dash-dot-dot line style
Fixes https://gitlab.com/kicad/code/kicad/issues/2206
2021-12-23 20:36:24 +00:00
Jeff Young
b52529521e
Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
...
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01:00
Seth Hillbrand
548e5f49bd
Clean up unused variable usage
...
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.
2021-10-05 10:00:30 -07:00
Wayne Stambaugh
46b959c3e3
Move plotter headers into include folder.
2021-08-18 16:38:31 -04:00
Wayne Stambaugh
6427197962
Remove duplicate headers in plot and associated code.
2021-08-17 15:41:25 -04:00
Wayne Stambaugh
8f30404e42
Plot code cleaning.
2021-08-17 13:44:11 -04:00
Wayne Stambaugh
bcd6bddfd4
Start expunging NULL.
...
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Wayne Stambaugh
08e8b17029
Minor plotter code improvements.
2021-06-07 14:32:27 -04:00
Ian McInerney
ecd9bf696e
Be consistent about using nullptr instead of 0
...
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
jean-pierre charras
fc04ece458
PDF plotter: fix a incorrect item in the header.
...
Fixes #5593
https://gitlab.com/kicad/code/kicad/issues/5593
2021-04-06 11:28:56 +02:00
Jon Evans
c04e19f9ac
Include optimization: move some things from common.h to point-of-use
2021-03-20 12:09:18 -04:00
Jeff Young
7933935b4a
Naming conventions.
2020-11-16 00:04:55 +00:00
Wayne Stambaugh
4ea3914d4e
Coverity fixes.
...
CIDs: 312996, 305508, 305509, 305510, 312992, 312997, 312994, 312995,
312968, and 306650.
2020-11-10 08:50:16 -05:00