Commit Graph

418 Commits

Author SHA1 Message Date
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Maciej Suminski 4ec24badb9 Enlarge OpenGL glyphs to match Cairo and legacy text size 2018-01-08 10:46:27 +01:00
Kristoffer Ödmark e7ddcca569 Fix some netname rendering issues
Fixes: lp:1739074
* https://bugs.launchpad.net/kicad/+bug/1739074
2018-01-08 10:29:50 +01:00
Jon Evans 9689200984 OpenGL: Fix background color being drawn twice in no-AA mode
Fixes: lp:1741363
* https://bugs.launchpad.net/kicad/+bug/1741363
2018-01-06 17:32:19 +01:00
Mark Roszko b98cc0b937 Some coverity fixes 2018-01-05 22:51:03 -07:00
Maciej Suminski 2fc07561f1 Fix crash when drawing a polygon with empty outline
In theory there should be no polygons with empty outline, but as you see
there was at least one leading to a crash.

Fixes: lp:1739455
* https://bugs.launchpad.net/kicad/+bug/1739455
2017-12-21 09:51:26 +01:00
Maciej Suminski 7741b90c78 gal: Draw grid from edge to edge
Fixes: lp:1677211
* https://bugs.launchpad.net/kicad/+bug/1677211
2017-12-20 09:28:39 +01:00
Bernhard Stegmaier 02d1b2611e Remove wx-3.1 only constructor from HIDPI_GL_CANVAS wrapper. 2017-12-18 16:26:01 +01:00
Bernhard Stegmaier 19d7112fa2 Merge HIDPI_GL_CANVAS wrapper with OPENGL_GAL implementation. 2017-12-18 16:26:01 +01:00
Bernhard Stegmaier 909d95b5be Create HIDPI_GL_CANVAS wrapper for transparent wxGLCanvas HiDPI/Retina support. Enable HiDPI/Retina for 3d-viewer. 2017-12-18 16:26:01 +01:00
Tomasz Włostowski eed924fe45 Fixed zone filling crash & thermal stubs inconsistency
Fixes: lp:1737557
* https://bugs.launchpad.net/kicad/+bug/1737557
Fixes: lp:1737542
* https://bugs.launchpad.net/kicad/+bug/1737542
Fixes: lp:1737541
* https://bugs.launchpad.net/kicad/+bug/1737541
2017-12-14 01:29:08 +01:00
Andreas Buhr 6205363b50 bugfix: OPENGL_GAL::DrawPolygon did not close closed polygons
The polygon drawing routing in the OpenGL-GAL did
not plot polygons which are "closed", i.e. have a segment
from their last point to their first point, correctly.
That segment was omitted.
This commit fixes this bug.
2017-12-13 17:01:32 +01:00
Andreas Buhr 5572183c22 bugfix: OPENGL_GAL::drawPolygon did not respect fill settings
The OPENGL_GAL::drawPolygon function and all functions using it
did not respect the isFillEnabled member set by
GAL::SetIsFill. This is fixed by this patch.
2017-12-11 10:21:37 +01:00
Maciej Suminski ef8f5db024 Handle space character in OPENGL_GAL::BitmapText()
Fixes: lp:1668455
* https://bugs.launchpad.net/kicad/+bug/1668455
2017-12-07 17:58:54 +01:00
Maciej Suminski 602ecf7502 Fix overbar display in OpenGL canvas
Moved the code handling text overbars to a single function
(ProcessOverbars()) to replace similar pieces of code trying to do the
same thing.

Fixes: lp:1735906
* https://bugs.launchpad.net/kicad/+bug/1735906
2017-12-07 17:58:54 +01:00
Tomasz Włostowski 8df299a6bc pcbnew: Optimized zone filling algorithm: code cleanup 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 316ddadec1 pcbnew: Optimized zone filling algorithm. 2017-12-05 14:54:57 +01:00
Jon Evans 0564d3456b Preserve color scheme when switching to legacy (Fixes lp:1670669)
Instead of modifying the colors when switching to legacy canvas,
they will now be preserved and only returned as the "legacy" colors.
2017-11-28 10:47:04 +01:00
jean-pierre charras 81ad3366f5 Avoid division by 0 in GAL::GetGridPoint( const VECTOR2D& aPoint ) 2017-11-07 09:45:03 +01:00
Maciej Suminski 5eb56dd8b0 Coverity fixes
CIDs:
102571
168696
168701
168704
168706
168708
168710
168713
168716
168717
2017-11-01 10:24:26 +01:00
jean-pierre charras 3407c6cf27 Gerbview: add icons in a context menu.
gal: remove a forgotten debug line.
2017-10-23 16:53:42 +02:00
jean-pierre charras 7418deb454 Pcbnew: fix issues with 360 deg angle arcs.
Fixes: lp:1725943
https://bugs.launchpad.net/kicad/+bug/1725943
2017-10-23 15:35:03 +02:00
Jon Evans 0b9b8d3e93 Add support for reversed draw order and Cairo negative draw mode 2017-09-25 13:35:01 +02:00
jean-pierre charras d8ade988ce workaround for a minor and strange issue: size of chars '-' and '_' are incorrect in msdf_atlasgen fonte. the size of 'x' char is used instead. 2017-09-19 18:56:33 +02:00
Jon Evans 93de82f0b2 Fix scrollbars in macOS GAL canvases 2017-09-15 11:29:49 +02:00
Maciej Suminski 8c7175b00d Upload correct amount of vertex data in CACHED_CONTAINER_RAM
Previous implementation uploaded only vertices with indices less
or equal to the number of stored vertices, which is invalid when
the container become fragmented.

Fixes: lp:1712887
* https://bugs.launchpad.net/kicad/+bug/1712887
2017-09-09 21:07:32 +02:00
Maciej Suminski 342bb2bf78 Code formatting
Renamed VERTEX related constants to follow UPPER_CASE naming.
2017-09-09 21:07:32 +02:00
Maciej Suminski b5db6a7d5d Map/unmap vertices once per layer order update
Multiple memory map/unmap operations cause a significant delay on
GPUs that fetch vertices from RAM.

Fixes: lp:1701936
* https://bugs.launchpad.net/kicad/+bug/1701936
2017-08-21 13:28:09 +02:00
Maciej Suminski 6ff065fa63 Fixed recognition of GPUs not handling glMapBuffer() efficiently
Fixes: lp:1685335
* https://bugs.launchpad.net/kicad/+bug/1685335

Fixes: lp:1683041
* https://bugs.launchpad.net/kicad/+bug/1683041
2017-08-18 15:02:46 +02:00
jean-pierre charras 8a1a3ed36c Better fix for compil problems in utils.cpp 2017-08-09 15:30:01 +02:00
jean-pierre charras 7ab6368869 Fix compil problems in utils.cpp, to be compatible with msys2/windows and linux. 2017-08-09 14:05:10 +02:00
Maciej Suminski c18d148589 Moved VERTEX_CONTAINERs intialization to the constructors 2017-08-08 15:33:57 +02:00
Maciej Suminski 4ae29aa693 Fixed a shadowing variable warning 2017-08-08 15:31:45 +02:00
Maciej Suminski 2697a21a7a Yet another try for correct function signature type cast 2017-08-08 15:26:50 +02:00
Maciej Suminski ef6910faa9 Take two for satisyfing picky compilers (casting nullptr to void*) 2017-08-08 14:53:34 +02:00
Maciej Suminski e91ce300fb Cast nullptr to const void* to satisfy picky compilers 2017-08-08 14:47:27 +02:00
Maciej Suminski 262fcc91af Fixes for video cards unable to use gl{Un,}MapBuffer correctly
Fixes: lp:1685335
* https://bugs.launchpad.net/kicad/+bug/1685335

Fixes: lp:1683041
* https://bugs.launchpad.net/kicad/+bug/1683041
2017-08-08 14:26:05 +02:00
Maciej Suminski 46b5575c51 OpenGL driver debug routines 2017-08-08 09:31:57 +02:00
Tomasz Włostowski 32185ddcd3 Multiple improvements concerning colors, configuration handling and legacy features in pcbnew:
- support for background color setting
    - removed several global config settings (such as g_Drc_On)
    - wrapped most of global config settings in PCB_GENERAL_SETTINGS class
    - reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
    - new GAL feature for legacy users: double-click (or E) to change track width available as an option.

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

Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
2017-08-04 16:06:57 +02:00
jean-pierre charras 1f6854f2b8 Make internal errors messages not translatable 2017-08-01 13:12:59 +02:00
Maciej Suminski 7399759b3b Fixed polygon DRAWSEGMENT rendering in OpenGL GAL
Fixes: lp:1704542
* https://bugs.launchpad.net/kicad/+bug/1704542
2017-07-28 10:34:47 +02:00
Oliver Walters c27f5b725d Improved various error messages
- Moved developer "jargon" to details pane
- Changed error messages to "WHAT" rather than "WHY" or "WHERE"
2017-07-25 07:37:14 -04:00
jean-pierre charras 5f4599fb56 Add a new color selector, to adjust color selection for GAL mode, with support of opacity (alpha channel)
Pcbnew: save opacity value in color config, and keep it when switching between legacy and gal mode.
2017-07-18 19:07:47 +02:00
jean-pierre charras ed66496242 Fix an issue (created by commit 16cb6a6ca0) when converting a color4D to a legacy color
Fixes: lp:1704724
https://bugs.launchpad.net/kicad/+bug/1704724
2017-07-17 09:59:34 +02:00
jean-pierre charras 16cb6a6ca0 color4d: fix incorrect conversion from rgb to HSV when r = g = b. 2017-07-16 17:10:24 +02:00
jean-pierre charras d3b382c281 GAL mode: the grid don't fill the full screen when moving the grid origin to negative values.
Fixes: lp:1703330
https://bugs.launchpad.net/kicad/+bug/1703330
2017-07-14 20:18:37 +02:00
jean-pierre charras a92ea8c75b Fixes: lp:1687014 Footpring editor disappearing axes crosshair
https://bugs.launchpad.net/kicad/+bug/1687014
2017-04-29 11:43:02 +02:00
jean-pierre charras e97c91b025 Fixes: lp:1683128 (pcbnew: the cairo canvas ignore arc width)
https://bugs.launchpad.net/kicad/+bug/1683128
2017-04-16 19:21:31 +02:00
John Beard c3ff34e0df Add reset text attributes function to GAL - use for arc tool
Independent drawing functions (that don't expect any particular state to
be set up fo them) on the GAL need to reset the GAL properties they
use. This adds GAL::ResetTextAttributes() to make this easier.

This is important, as failing to reset mirroring can cause asserts in
OpenGL.

This is used in the Ruler tool (which previously did it one attribute at
a time) and also the Arc layout assistant, which previously failed to
reset mirroring.

Also reset on GAL construction, as these members appear to be
uninitialised.
2017-03-31 15:59:31 +02:00
Jon Evans 8cd1df0524 Add output stream operator for COLOR4D 2017-03-31 06:48:04 -04:00