Commit Graph

43 Commits

Author SHA1 Message Date
jean-pierre charras 0aca35bcab Eeschema, plot: fix missing initialization that created 0 size texts.
0 sized texts are hard to read
2022-01-11 20:47:16 +01:00
Seth Hillbrand 7ef8843545 Assign font if null
Fixes https://gitlab.com/kicad/code/kicad/issues/10370
2022-01-11 11:05:38 -08:00
Jeff Young 236feeb592 Cleanup GRText APIs, 3D Viewer <-> board APIs, and Plotter APIs.
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
2022-01-10 14:17:11 +00:00
Jeff Young 7d032f9c2f Outline font rendering for Cairo, plotter, printer and 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +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 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
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 52bbfb9109 Remove dependency of dot size on linear mils
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
2021-10-10 09:40:26 -07:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -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
Seth Hillbrand cccdaddd50 Adding SHAPE_ARC direct plotting 2021-06-03 17:12:56 -07: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
Jeff Young 2ad5108e7d Don't depend on wxWidgets dotted and dashed line styles.
Turns out they're buggy on OSX.

Fixes https://gitlab.com/kicad/code/kicad/issues/7144
2021-02-05 16:18:28 +00:00
Jeff Young 7933935b4a Naming conventions. 2020-11-16 00:04:55 +00:00
Jeff Young ec020dd19f First-class support for filled shapes. 2020-11-14 01:40:32 +00:00
Marek Roszko b9f1601418 Rename PLOT_MODE to OUTLINE_MODE 2020-10-15 19:33:18 -04:00
Marek Roszko eb33c33f15 Rename EDA_DRAW_MODE_T to PLOT_MODE 2020-10-15 19:30:07 -04:00
Marek Roszko 1538d737e7 Split out FILL_T to its own header to avoid spreading eda_item everywhere 2020-10-14 21:51:23 -04:00
Marek Roszko b2e9f6987d Split base_struct into eda_item and eda_rect 2020-10-13 21:24:50 -04:00
jean-pierre charras 380534807b Plotters: better support of filled circles having a thickness set to 0.
Setting a line thickness = 0 for graphic objects (circle, rect, line) is
allowed but creates issues for circles that were plotted a non filled shapes
but having a outline thickness = 0.
2020-10-12 11:30:43 +02:00
jean-pierre charras 8285110c2a more cleanup about removing useless include 2020-10-02 08:58:19 +02:00
Wayne Stambaugh 2078e629c5 Eeschema: allow editing of junction properties diameter and color.
Add missing plot and print changes for the new bus entry properties.

ADDED: Junction properties diameter and color can now be edited.

Fixes: https://gitlab.com/kicad/code/kicad/issues/4593
2020-06-24 13:36:17 -04:00
Jeff Young c7da63151c Clamp egregiously large numbers when plotting.
This keeps some plot file viewers (such as Acrobat) from choking.

Fixes https://gitlab.com/kicad/code/kicad/issues/4408
2020-05-18 13:38:17 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
jean-pierre charras 9d2712a824 Fix a few Coverity warnings.
It also fix:

Fixes #4082
https://gitlab.com/kicad/code/kicad/issues/4082
2020-03-29 18:42:24 +02:00
Jon Evans 643c97a2f4 ADDED: Schematic plotting can use a dedicated color theme
ADDED: PDF, PS, and SVG plots can optionally include the page background color

Fixes #1830
2020-03-06 00:01:02 -05:00
Seth Hillbrand e38ab6c699 Treat 0-length ovals as circles
Some buggy SVG interpreters can't handle 0-length ovals.  In this case,
they are meant to be circles, so we can export as circles in our
plotter.

Fixes https://gitlab.com/kicad/code/kicad/issues/3995
2020-03-04 18:03:20 -06:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* 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.
2020-01-07 17:12:59 +00:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
jean-pierre charras 5833392689 FIX: Pcbnew plot BezierCurve: add missing line thickness initialization. 2019-11-09 14:02:41 +01:00
jean-pierre charras 5f3353cad1 Add native Bezier curve plot in SVG plotter. 2019-11-05 14:27:07 +01:00
Seth Hillbrand 53989e3bdc SVG: Correct plot fills for arcs/polylines
When plotting in Eeschema, various elements may be filled with either
the foreground or background colors.  The fill mode is rather unique,
requiring un-stroked pie wedges for arcs and both closed and open filled
polylines.

Fixes: lp:1840769
* https://bugs.launchpad.net/kicad/+bug/1840769

(cherry picked from commit 213547f545)
2019-08-20 12:03:56 -07:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young fee52e127f Add line style drawing. 2018-10-09 11:08:56 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01:00
jean-pierre charras 5868202c28 rename files, mainly files for plotter control 2018-01-28 18:13:27 +01:00
Renamed from common/class_plotter.cpp (Browse further)