Commit Graph

418 Commits

Author SHA1 Message Date
Alex Shvartzkop 1bb507e3c4 Reduce VERTEX_ITEM size by removing vfptr.
24 -> 16 bytes.
2024-06-20 19:08:07 +03:00
Alex Shvartzkop 4b96bb5d8f Support touchscreen gestures (zoom/pan/rotate) in 3D viewer.
Though rotate doesn't work yet on MSW due to a wxWidgets bug.
2024-06-08 21:13:16 +03:00
Alex Shvartzkop 8f8a68229c Handle touchscreen gesture events for zoom/pan. 2024-06-08 16:00:34 +03:00
Alex Shvartzkop 8e90063258 Support hidpi in Cairo GAL canvas; performance improvements.
We now draw onto wxBitmap directly, reducing the amount of copying.
Also moves the bitmap blit into paint event handler.
Modifies ClearScreen to work universally between Cairo/OpenGL backends.
2024-06-08 12:51:27 +03:00
Alex Shvartzkop cf7ad330e9 Fix some platform ifdef checks. 2024-06-01 06:49:11 +03:00
Jeff Young 931de12072 Use wxWidgets to track DPI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17981
2024-05-31 17:08:43 +01:00
Seth Hillbrand ab0426d620 Detect if HiDPI cursors are needed
HiDPI cursors are twice as large as regular cursors, allowing them to be
more easily seen on a HiDPI system

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16231
2024-05-26 07:51:15 -07:00
Ian McInerney 9e597ea754 Add the option to use alternating row colors in tables/grids
ADDED: Option to use alternating row colors in tables/grids

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16739
2024-04-01 21:59:37 +01:00
Alex Shvartzkop f6f0b9a661 ADDED: PCB 3D image raytracing rendering from CLI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3691
2024-03-08 14:38:18 +00:00
Alex Shvartzkop 80457d5871 Support transparent background in 3D viewer PNG/clipboard export.
Only really works with realtime renderer currently.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12060
2024-02-29 17:11:53 +03:00
Alex Shvartzkop 3582edb185 Cairo GAL: reduce buffer allocation sizes.
cairo_format_stride_for_width() result is in bytes.
Also removes unneeded extra width.


(cherry picked from commit d359fb8ab9)
2024-02-28 00:53:56 +00:00
Jeff Young aef6b2a66e nullptr safety and a bit of wxT'ing. 2024-02-09 13:56:01 +00:00
Jon Evans 1c895fe18c Improve rendering of tuning status popup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16304

Add dedicated UI rendering layers

Switch to screen-space rendering to avoid blurriness

Fix a bug in OpenGL GAL that causes layer
ordering to be broken when using Scale

Fix some issues with VIEW_GROUP layer ordering
2023-12-19 22:38:21 -05:00
Wayne Stambaugh 6269453416 Coverity warning fixes. 2023-10-27 16:48:14 -04:00
jean-pierre charras 6f9affe3db Fix compil warnings: disable #pragma specific to MSVC 2023-09-27 08:22:39 +02:00
Marek Roszko 4746bde4b3 gal as a shared lib, gaasl! 2023-09-26 22:31:31 -04:00
Marek Roszko a3c662839c Remove accidentally committed headers 2023-09-24 08:09:21 -04:00
Marek Roszko 37479c4154 HIDPI_GL_3D_CANVAS needs CAMERA so move it over 2023-09-23 20:06:57 -04:00
Marek Roszko 669f9d795f Trim the camera includes 2023-09-23 20:06:57 -04:00
Marek Roszko f8e33be07f Break out the boundary violating parts of gal into common through subclassing 2023-09-23 09:37:47 -04:00
Marek Roszko ee91b550d8 gl_context_mgr and gl_util belong in the gal folder 2023-09-19 23:06:44 -04:00
Marek Roszko 43a59275c3 Remove unused header 2023-09-19 21:14:26 -04:00
Marek Roszko 4a53c8f330 newstroke_font can live in kicommon
Turns out, gal doesnt even use newstroke_font.h anymore, stop bleeding it everywhere due to the gal header
2023-09-18 07:40:02 -04:00
Marek Roszko 2b90607dcd Shuffle color4d into kicommon since its used many places 2023-09-16 19:12:55 -04:00
Marek Roszko 5c62b98e7c observable can live in core 2023-09-06 21:25:24 -04:00
Marek Roszko 67b031adab Painter base class should just live in gal instead of being in denial 2023-09-06 20:23:19 -04:00
Marek Roszko a6a20bf8dc Evict the Pgm() dependency in GAL 2023-09-06 20:13:46 -04:00
Alex Shvartzkop 10e2e4a12d Another try at fixing arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Rastersoft 43fe1eec84 Unify mouse movements 2023-08-17 18:20:22 +00:00
Kuba Sunderland-Ober 1edb9bb0ce Get rid of VECTOR2U. 2023-06-28 20:48:07 +00:00
Marek Roszko 6e468c5ce9 Fix more warnings
Needless const and out of order initializer
2023-05-29 23:01:58 -04:00
Marek Roszko 573b66d243 Fix a bunch of C5266 warnings (pointless const on bool/int returns)
warning C5266: 'const' qualifier on return type has no effect
Microsoft doesn't even document C5266
2023-05-18 21:35:06 -04:00
Ian McInerney 18ea3be3f2 Revert "Reintroduce constexpr to COLOR4D"
This reverts commit 33da9b2327 and the
following commit dc08c48f33.

C++17 changed the behavior of static class member variables that are
constexpr defined. Previously this definition/declaration split was
valid for constexpr members, but after C++17 the static constexpr member
variables are automatically inlined, so the declaration is no longer
exported in some compilers (GCC 9/10/11 seem to have problems).

An alternate way of constexpr member variables is putting the
initialization in the class definition, but we can't init a COLOR4D
object when defining the COLOR4D class.

For now, revert this change until we can figure out the proper way of
architecting these colors.
2023-04-06 20:18:31 +01:00
Wayne Stambaugh b05de51a8d Fix a few Coverity issues. 2023-04-06 08:48:02 -04:00
Ian McInerney 33da9b2327 Reintroduce constexpr to COLOR4D
This fixes the initialization-order fiasco in the color initialization
sequence, which was originally fixed by making COLOR4D constexpr, but
was then reintroduced when the assert was changed to wxASSERT (wxASSERT
is not compatible with constexpr).
2023-04-05 14:07:01 +01:00
Wayne Stambaugh c3e6825d62 Add hashing to and unit tests for some low level objects. 2023-04-04 15:28:34 -04:00
Wayne Stambaugh 28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
Jon Evans 43d3a18b86 Improve HiDPI handling of appearance/layer controls 2023-02-22 09:20:36 -05:00
Ian McInerney be19e967dc Remove WX_COMPATIBILITY flag
Some classes had been originally designed to be usable separate from wx,
but over time our uses of the classes have become entertwined with wx
features (e.g. colors), and various changes have also leaked wx into the
classes unguarded. So just remove the option to hide wx in those classes
to simplify the code.
2023-02-22 01:44:06 +00:00
Ian McInerney 0ba116a3ee Remove unused functions from COLOR4D 2023-02-22 01:44:06 +00:00
Seth Hillbrand a206f6717d Desaturate the symbols in DNP for print/plot
The desaturation should match screen display

Fixes https://gitlab.com/kicad/code/kicad/issues/13481
2023-01-11 13:44:08 -08:00
Seth Hillbrand 1cc9792cdb Fix snapping dist when disabling grid
The disable grid hotkey should allow the snap scale to be completely
determined by the snapSize and world scale.  This prevents snapRange
from overriding in the case where grid is disabled.

Additionally, we disallow grid snapping when the grid scale is not
visible.  This means that when zoomed out sufficiently to not show the
minor ticks, these minor ticks will not override a snap

Fixes https://gitlab.com/kicad/code/kicad/issues/12303
2022-12-21 17:47:45 -08:00
Alex dcb131c20d Improve canvas responsiveness by better swap interval management. 2022-11-18 00:32:25 +05:00
Alex 399aa7e418 Implement SetSwapInterval on Windows. 2022-11-18 00:32:25 +05:00
Jeff Young c0a666507c Work around more instances of the wxWidgets color string locale bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/12552
2022-09-30 20:56:25 +01:00
Alex 39089ad805 Allow GAL_DRAWING_CONTEXT dtor to throw exceptions.
These destructors are implicitly noexcept, which woudnt't allow
OpenGL errors to be caught in DoRePaint.

Fixes https://gitlab.com/kicad/code/kicad/issues/12117
2022-09-30 02:47:30 +03:00
Jeff Young be5fb2c7b8 Provide a default (non-optimized) version of DrawGlyphs.
(We could possibly implement an optimized version for CALLBACK_GAL,
but not having an impl at all was breaking DRC and the DRC tests.)
2022-09-15 02:25:00 +01:00
dsa-t bd8b737c44 GAL: Do better job at reserving vertices. 2022-09-14 16:07:47 +00:00
Jeff Young 9188838e50 RIP EDA_RECT. 2022-08-31 23:57:24 +01:00
Mike Williams 3669cb4673 PCB Editor: Add User Background Images 2022-07-14 11:23:23 +00:00