Commit Graph

50 Commits

Author SHA1 Message Date
Jeff Young b8e97bb6b6 Only apply B&W printer fixes when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/7388
2021-02-02 15:37:30 +00:00
Jeff Young a235103e48 Redo pad & via painting (again).
New strategy isolates all draw/don't draw decisions to the ViewGetLOD
routines, and all dimmed/not dimmed to PCB_RENDER_SETTINGS::GetColor.
The actual drawing in PCB_PAINTER is more-or-less conditon free.

Also adds new layers for pad and via hole walls so that they can be
controlled for high-contrast mode.

Also changes the drawing paradigm so that the pads are drawn even when
not on the high contrast layer, just in low contrast.  The hole wall
is drawn in high contrast.  This actually makes things clearer to the
user (although to be honest was done to keep from having to re-render
pads when the high contrast layer changes since we have two separate
layers now that we can adjut colours on).

Fixes https://gitlab.com/kicad/code/kicad/issues/7328
2021-01-30 16:31:27 +00:00
Wayne Stambaugh f06a5894b3 Header clean up round 3. 2020-12-19 18:29:10 -05:00
jean-pierre charras f6b4b66a86 Avoid include wx/wx.h in many files that do not actually use this include.
Including wx.h includes the full set of wxWidgets include files, that is not good,
and can create some conflicts with some Windows headers on msys2.
2020-10-18 18:21:34 +02:00
Marek Roszko f59551d6ad Remove painter.h from eda_text.h 2020-10-14 19:18:38 -04:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
jean-pierre charras 04ea20dd44 Eeschema, SCH_PAINTER: fix max text thickness issue, to have small texts readable. 2020-04-14 11:08:42 +02:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young 5134856f18 Rationalise 3D settings data-structure.
Move the camera out to its own so that everything else is board-
related, and then rename BOARD_ADAPTER.

At some point the flags should probably be moved out too, and they
can have the EDA_3D_SETTINGS name.
2020-03-28 16:09:40 +00:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Jeff Young fa84babefe Re-implement sch->pcb cross-probing using net highlighting architecture.
Fixes: lp:1827853
* https://bugs.launchpad.net/kicad/+bug/1827853
2019-06-26 21:54:03 +01:00
Seth Hillbrand 4a52062a54 GAL: Make high-contrast meld into background
This mixes the de-emphasized layers into the background color rather
than merely a black color.  This also keeps some of the original layer
color.

Fixes: lp:1831316
* https://bugs.launchpad.net/kicad/+bug/1831316
2019-06-09 08:16:58 -07:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
Maciej Suminski e81c3a59a2 Refactored and unified board editor and footprint editor print dialogs 2018-10-31 19:17:30 +01:00
Maciej Suminski 347e21daaa Handle printout settings: line width, color/mono, mirror 2018-10-31 19:17:30 +01:00
Jeff Young 9dfcc839a4 Fix color issues with cursor and sheet pins. 2018-10-09 11:08:56 +01:00
Tomasz Wlostowski 7e1458a9ce eeschema-gal: implement IsBackgroundDark() 2018-10-09 11:08:52 +01:00
Jeff Young df863e44e2 Wire m_showPageLimits control up to GAL canvas.
Fixes: lp:1499285
* https://bugs.launchpad.net/kicad/+bug/1499285

(cherry picked from commit 4cb7442)
2018-07-17 15:13:29 +01:00
jean-pierre charras 79a9f401a3 Fix a minor issue in pad editor dialog: in GAL mode, the pad was sometimes shown in outline mode, sometimes in filled mode
Fixes: lp:1740668
https://bugs.launchpad.net/kicad/+bug/1740668
2018-01-12 19:58:32 +01:00
jean-pierre charras 70226ecdeb Fix a few doxygen warnings 2017-06-20 10:47:30 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
Jon Evans 7cd72d6ffb Move layer colors from PCB_RENDER_SETTINGS to RENDER_SETTINGS 2017-02-16 17:30:31 +01:00
Simon Richter da5699de0a Replace boost::shared_ptr with std::shared_ptr. 2016-06-29 11:09:55 -04:00
Maciej Suminski b1d241c271 Net highlighting mode is toggled when used on the same net (GAL). 2015-09-03 17:56:30 +02:00
jean-pierre charras 24f516f6ae Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc. 2014-11-02 17:25:04 +01:00
Maciej Suminski 69816d8704 The GAL view uses colors settings from the legacy canvas.
Minor refactoring of PAINTER & RENDER_SETTINGS classes.
2014-05-21 23:13:30 +02:00
Maciej Suminski d27ea7895d Moved background color settings from GAL to RENDER_SETTINGS. Added RENDER_SETTINGS::TranslateColor() to convert between EDA_COLOR_T and COLOR4D. 2014-05-14 10:35:12 +02:00
Maciej Suminski a6917280fe Added net highlighting. 2014-04-04 17:40:00 +02:00
Maciej Suminski 0ac3e1fbf2 Namespace KiGfx->KIGFX.
template<> -> template <>
Some more reformatting according to uncrustify results.
2013-10-14 16:13:35 +02:00
Maciej Suminski 3d0753c920 Added get functions for high contrast mode fields. 2013-09-17 11:19:15 +02:00
Maciej Suminski 573f9841df Better way of marking 'brightened' mode for items. 2013-09-16 11:00:59 +02:00
Maciej Suminski 90a3b97c2f Added drawing of worksheet layout. 2013-09-11 14:42:12 +02:00
Maciej Suminski e2f5b2779f Changed lifetime of RENDER_SETTINGS (now they are accessible right after PAINTER object is created). 2013-09-11 12:09:22 +02:00
Maciej Suminski afe2e27b0a Moved GetColor() from PAINTER to RENDER_SETTINGS. Fixed recaching of custom items. 2013-09-11 11:39:46 +02:00
Maciej Suminski c5d3376c26 Changed some 'magic numbers' into constants. Added const modifier in appropriate spots. 2013-09-11 11:34:10 +02:00
Maciej Suminski 402f3c6f2c Added brightened mode for selecting items using disambiguation menu. 2013-08-08 12:30:00 +02:00
Maciej Suminski e050133c07 Simplified color computation. 2013-08-07 09:51:39 +02:00
Maciej Suminski c5ca075e24 Added an interface for highlighting. 2013-07-17 10:21:46 +02:00
Maciej Suminski 7739cfef2f Added support for multiple active layers (colored ones in the high contrast mode).
Added separate layers for pad netnames (now these are divided into multilayer/top/bottom pads).
More appropriate layers are selecting a copper layer in the high contrast mode (now it shows the copper layer itself, vias & multilayer pads and netnames).
2013-07-16 13:40:53 +02:00
Maciej Suminski 84392f1723 Moved STROKE_FONT from PAINTER to GAL. 2013-07-04 11:37:43 +02:00
Maciej Suminski 3f1da8b2c0 Minor code cleaning. 2013-06-27 17:31:10 +02:00
Maciej Suminski db74de74f5 Added possibility to change cached layer color (for the purpose of high contrast display). 2013-06-25 17:12:54 +02:00
Maciej Suminski 1fc0113b06 Removed unnecessary casting from VIEW_ITEM to EDA_ITEM. Added Type() function to VIEW_ITEM. 2013-06-18 17:01:23 +02:00
Maciej Suminski 5b9057823a Introduced SetGAL() functions that will allow changing GAL backend for rendering on the fly. 2013-04-15 16:03:05 +02:00
Maciej Suminski 664692b2e6 Added outline display mode for pads, vias & tracks 2013-04-08 10:54:31 +02:00
Maciej Suminski 329eae1f74 Added GetSettings() method for obtaining current rendering settings used by PAINTER class. 2013-04-04 11:23:23 +02:00
Maciej Suminski e262b32198 Introduction of Graphics Abstraction Layer based rendering for pcbnew.
New classes:
    - VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.)
    - VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes).
    - EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL).
    - GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries.
    - WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc.
    - PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods.
    - STROKE_FONT - Implements stroke font drawing using GAL methods.
                          
Most important changes to Kicad original code:
    * EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects.
    * EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime.
    * There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew)
    * Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom.
    * Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime.
    * Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods.
    * Removed tools/class_painter.h, as now it is extended and included in source code.
                         
Build changes:
    * GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL.
    * When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required.
    * GAL-related code is compiled into a static library (common/libgal).
    * Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad
                            
Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS).
More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
2013-04-02 08:54:03 +02:00