Commit Graph

159 Commits

Author SHA1 Message Date
Seth Hillbrand 0ee7f8e2bd Fix 436f95e02e
NanoSVG does handle opacity (thanks Mark) but the check needs to be
unsigned if we are comparing the resulting down-shifted value against
zero

Fixes https://gitlab.com/kicad/code/kicad/issues/13033
2022-11-29 11:21:16 -08:00
Seth Hillbrand 436f95e02e Don't look for alpha in nanosvg color
Nanosvg colors are only RGB, so we will never get an alpha value here.

Fixes https://gitlab.com/kicad/code/kicad/issues/13033
2022-11-29 10:44:03 -08:00
Kliment c5fe265eb4 Take axis inversion into account when importing graphics. Fixes #9351. 2022-11-19 17:25:27 +01:00
jean-pierre charras 85e44c2dae pcbnew, SVG import: fix an issue for SVG files using a CR+LF end of file
The issue was in a validity test working only if CR+LF is not replaced by LF
Fixes #10096
https://gitlab.com/kicad/code/kicad/issues/10096
2022-11-09 09:33:51 +01: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
aris-kimi 6bc00eabaf dialog_dxf_import dialog minor UI fixes 2022-10-10 02:51:24 +00:00
Jeff Young 1a812727cb Fix some logic errors in importing SVG polygons with holes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11479
2022-09-27 17:45:21 +01:00
Marek Roszko 3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Marek Roszko 66e8931405 Remove IU_PER_MM thats standalone 2022-09-16 21:09:27 -04:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Jeff Young 8ae0ddf09d Move import graphics dialog to UNIT_BINDER.
Also fixes a bug where the position gets scaled (because we're
applying it to the imported values, which are automatically scaled).

Fixes https://gitlab.com/kicad/code/kicad/issues/10483
2022-09-13 00:59:56 +01:00
Marek Roszko bf964d8678 Commonize page_info by simply making the Iu scale a parameter on call. 2022-08-27 13:36:00 -04:00
Marek Roszko 98b3904c51 Fix reserve call with the wrong source for size 2022-08-16 23:38:08 -04:00
Jeff Young 763c77eab8 DXF parameters are for DXF (only).
Fixes https://gitlab.com/kicad/code/kicad/issues/12021
2022-07-18 17:51:20 +01:00
luz paz af6ba1a16e Fix typos in pcbnew sub-directory
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`
2022-06-30 09:39:45 -04:00
Marek Roszko b18e441a88 Free memory in dxf import sooner on bad_alloc 2022-04-02 09:57:30 -04:00
Marek Roszko 9f8c0a8185 Catch memory exhaustion trying to import large DXFs
See https://gitlab.com/kicad/code/kicad/-/issues/11308
2022-04-01 23:15:06 -04:00
Marek Roszko d74a0cdaa3 Don't pre-scale the line width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11122
2022-03-13 23:08:28 -04:00
jean-pierre charras dbfdd3fb56 Fix some Coverity warnings. 2022-03-06 09:48:33 +01:00
jean-pierre charras 8de4f762e1 svg importer: fix a crash when importing some files with no graphic item 2022-02-27 09:59:42 +01:00
Tomasz Wlostowski 018f4531a5 Fixes in the SVG import polygon postprocessing:
- don't drop subsequent polys when a non-filled primitive is imported 'in between'
- fix missing holes (also related to the interleaving of stroke and filled shapes, depending on the software that wrote the SVG file)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10813
2022-02-14 00:54:31 +01:00
Jeff Young 34a9a165c9 More wide-string declarations. 2022-02-05 22:26:31 +00:00
Jeff Young c8a50d9b50 Remove unit-less angles from VECTOR2I/D APIs. 2022-01-20 23:58:20 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Marek Roszko 98ee6c5f85 Cleanup some wx/gdicmn.h includes 2022-01-04 20:32:27 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Tomasz Wlostowski 01d1f8723c SVG_IMPORT_PLUGIN: enable postprocessing of polygons with degeneracy and holes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6739
2021-12-31 17:05:50 +01:00
Tomasz Wlostowski 3fce15f442 GRPAHICS_IMPORTER_BUFFER: forgot to store the indices of the paths belonging to a compound shape 2021-12-31 17:04:16 +01:00
Tomasz Wlostowski e1f32f13a2 pcbnew: SVG importer support for even-odd fill rule 2021-12-31 17:04:16 +01:00
Tomasz Wlostowski 5d87b37f52 pcbnew: GRAPHICS_IMPORTER can now recognize multi-path shapes (and postprocess polygons with holes into Kicad-compatible fractured polysets) 2021-12-31 17:04:16 +01: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 c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Jeff Young e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
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.
2021-12-23 20:36:07 +00:00
Seth Hillbrand 1160bd94b0 Scale vertex lineweights in DXF import
DXF lineweights are always in 100th of mm, so scale the set weights on
import

Fixes https://gitlab.com/kicad/code/kicad/issues/9854
2021-12-07 16:23:44 -08:00
Seth Hillbrand c613f5e2f1 Convert DXF arcs in fp space
Once the arcs are set in pcbnew, they have integer representation and
can accumulate rounding errors.  So we convert the start/end points in
the importer to ensure that the connected points in a DXF remain
connected

Fixes https://gitlab.com/kicad/code/kicad/issues/9827
2021-12-07 10:53:35 -08:00
Seth Hillbrand c4a6a61743 Don't truncate values on import
Leads to off-by-one errors when converting to internal values

Fixes https://gitlab.com/kicad/code/kicad/issues/9827
2021-11-30 16:10:56 -08:00
Tomasz Wlostowski bba742b804 pcbnew: support vertex line start/end width to correctly import certain DXF files 2021-10-25 17:39:09 +02:00
Tomasz Wlostowski df47c1c4e9 pcbnew: use doubles to pass line widths in the DXF importer as they are expressed in DXF's units and can case severe rounding errors when passed as ints 2021-10-25 17:36:04 +02:00
Roberto Fernandez Bautista 987d64c88e pcbnew graphics import: Fix arc winding direction 2021-10-23 11:02:00 +01:00
Jeff Young 9b9e379aa0 Overhaul arc internal model to not over-specify information. 2021-10-15 12:45:43 +01:00
Jeff Young a41944020d Push most of PCB_SHAPE impl down in to EDA_SHAPE. 2021-10-15 12:45:43 +01:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 3aae3c6f65 Dark mode for a bunch of HTML dialogs.
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT

Fixes https://gitlab.com/kicad/code/kicad/issues/9157

Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Marek Roszko daca9d21f2 Add dxf point import
Fix #9149
2021-09-12 19:38:52 -04:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Jeff Young 0fb864d596 Pull some name changes back from 7.0 to ease merging. 2021-07-21 20:58:59 +01:00
Wayne Stambaugh cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00