Commit Graph

276 Commits

Author SHA1 Message Date
Alex Shvartzkop 31e79ef54f PDF plot: match mirror state between hidden and plotted text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16066
2023-11-12 00:48:18 +03:00
Alex Shvartzkop 443da9943a SVG plotter: fix hidden text orientation when plot is mirrored.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15422

(cherry picked from commit 556120554e)
2023-11-10 00:27:39 +03:00
jean-pierre charras 82a1b02b4a Plotters (especially DXF) add more precision when plotting arcs (and others)
- in DXF coordinates were using 6 digits for coordinate mantissa:
this is not enough for coord in inches. Now use 16 digits
- Arc( VECTOR2I& aCentre, EDA_ANGLE& aStartAngle, EDA_ANGLE& aEndAngle, ...)
was using integers for coord.
This creates significant errors for start point and end points of the arc.
Now the center is given in double, and its position is calculated from angle end points
(and radius) to do not generate a position error for these end points
(previously the error could be 20 ... 50 nm)
From master branch
Fixes #15056 https://gitlab.com/kicad/code/kicad/-/issues/15056
2023-10-23 17:59:31 +02:00
Alex Shvartzkop cbf1b2af47 HPGL plotting: fix random lines connecting to circles.
(cherry picked from commit 45791ff8d6)
2023-10-22 13:56:21 +03:00
Alex Shvartzkop 4f5fca4e67 HPGL plotting: write rects as polygons to prevent always filling.
(cherry picked from commit d9c123b1ec)
2023-10-22 13:55:54 +03:00
Alex Shvartzkop e0158a8ed7 DXF plotting: write zero-sized rects and circles as points.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15862

(cherry picked from commit 3e82e59c24)
2023-10-22 13:55:54 +03:00
Alex Shvartzkop 40e7ba67d1 PDF plotting: fix zero-sized or too thick rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15862

(cherry picked from commit 843bd4f79c)
2023-10-22 13:22:42 +03:00
jean-pierre charras 87c8688f70 genDrillMapFile: reduce the pen width used to plot oval shapes (better look)
From master branch
2023-10-06 09:33:57 +02:00
Seth Hillbrand 9de58a29e3 Avoid bulking drawing sheet polygons
On the drawing sheet, the polygons are always filled and shouldn't have
additional stroking

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15242

(cherry picked from commit e71422d2cf)
2023-08-04 13:51:38 -07:00
Alex Shvartzkop d6eb66c738 PDF plotting: Fix "Show Page" in Foxit PDF Reader.
pageNum is an Integer. Acrobat seems to convert automatically.

(cherry picked from commit 698fffb128)
2023-07-09 05:46:11 +05:00
Seth Hillbrand bff2f53996 Correct alpha blending in PDF plot
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

(cherry picked from commit d405fff1d8)
2023-05-11 16:27:15 -07:00
Jeff Young e28b50e8d6 Fix a bunch more issues with sheetpaths and allowExtraText.
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).

(cherry picked from commit b41d446f58)
2023-05-05 18:02:59 +01:00
jean-pierre charras 36978d2ddc Gerber plotter: fix incorrect arcs in regions when using a plot offset.
The arc center in Gerber units was incorrectly calculated.
From master
Fixes #14402
https://gitlab.com/kicad/code/kicad/issues/14402
2023-03-24 11:37:26 +01:00
jean-pierre charras dcc1009162 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.
From master, commit 51d46c0e73
2023-03-01 10:45:23 +01:00
jean-pierre charras d61e01ff4f Plot Gerber format: ensure all attributes are added to polygon items.
Especially, TA.AperFunction,EtchedComponent for net tie footprints using polygons.
From master, commit ece34e1a0c
2023-03-01 09:39:15 +01:00
Salvador E. Tropea 4213bb3a62 Fix rounding errors in gerber files
The userToDeviceCoordinates helper returns a VECTOR2D
Converting it to VECTOR2I back and forth generates rounding errors
Also is a waste of time
2023-02-28 19:23:26 +00:00
jean-pierre charras c3d7158669 Eeschema plot: honor B&W plot option for bitmap images.
Fixes #14013
https://gitlab.com/kicad/code/kicad/issues/14013
2023-02-23 09:53:35 +01:00
jean-pierre charras d5eb242295 Fix incorrect tilt of italic texts when plotting them.
Fixes #14023
https://gitlab.com/kicad/code/kicad/issues/14023
2023-02-22 20:25:25 +01:00
FPiorski 7978fdbfce Plot colored drawing sheet text with the correct color 2023-02-09 14:12:48 +00:00
Marek Roszko 0ff32d20cd wxS more things 2023-01-22 09:41:42 -05: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
Marek Roszko f1f5fff072 Add cli export of symbols from kicad libraries 2022-12-12 22:44:26 -05: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
Jeff Young cef7cd8f7c Move default font to RENDER_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/12723
2022-10-22 21:32:42 +01:00
Wayne Stambaugh 598b09821a Coverity fixes. 2022-10-17 15:30:20 -04:00
Jeff Young 92f1ee556f Don't fill drawing sheet rects with transparent fill.
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).
2022-10-17 17:51:11 +01: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
jean-pierre charras f851526c67 Plotters: make virtual void PLOTTER::Arc() using arc angles protected.
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.
2022-09-20 18:55:20 +02:00
Jeff Young 7f34586c7e Allow text variable resolution through properties in drawing sheet text.
Fixes https://gitlab.com/kicad/code/kicad/issues/12473
2022-09-20 15:28:05 +01:00
jean-pierre charras bbaf5a21c2 Eeschema: fix a plot issue with arcs.
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 #12465
https://gitlab.com/kicad/code/kicad/issues/12465
2022-09-20 16:04:17 +02: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 9188838e50 RIP EDA_RECT. 2022-08-31 23:57:24 +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