7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-02 00:26:45 +00:00
Commit Graph

437 Commits

Author SHA1 Message Date
Seth Hillbrand
6c2a559cbe Set base user layer count
Default colors cycle through repetition for unknown layers.  Allows
importing from complex Altium/CADSTAR boards with more than 10
documentation layers
2025-01-28 12:22:39 -08:00
John Beard
3b490cdd3b Eeschema: yeet wire-with-plus icon
This icon was only used for auto-starting a wire, which was
inconsistent with auto-starting a bus or graphic line.

Also the plus sign is a little confusing as it could also be
interpreted as the origin marker (which is really bottom left),
which is also plus-shaped.
2025-01-11 00:34:48 +08:00
Seth Hillbrand
09e30adbb1 Move GL_CONTEXT_MGR into PGM_BASE singleton
This is the second try at 5326c36a5f.  The difference here is that we
have moved GL_CONTEXT_MGR into kicommon first which will hopefully
address some of the Windows linkage issues

The GL context lock needs to be shared across kifaces.  Otherwise, we
can end up blocking the lock from one kiface.  Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts.  But that's what this
fixes.
2025-01-09 09:03:08 -08:00
Seth Hillbrand
d48c40ba26 Move GL_CONTEXT_MANAGER to kicommon 2025-01-09 09:03:08 -08:00
Ian McInerney
8a706f204d Make GAL_DISPLAY_OPTIONS have virtual destructor
This is needed to allow proper deletion of derivative objects using this
as a base class.
2025-01-06 12:08:34 +00:00
Wayne Stambaugh
89db935910 Housekeeping in include path sub-folders. 2025-01-04 09:21:11 -05:00
Seth Hillbrand
f38e661a02 Revert "Move GL Context into Singleton class"
This reverts commit 5326c36a5f.
2025-01-03 21:22:37 -08:00
Seth Hillbrand
5326c36a5f Move GL Context into Singleton class
The GL context lock needs to be shared across kifaces.  Otherwise, we
can end up blocking the lock from one kiface.  Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts.  But that's what this
fixes.
2025-01-03 17:26:23 -08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
jean-pierre charras
2cd28009ef Define MAX_LAYERS_FOR_VIEW to init GAL::Mxx_DEPTH and VIEW_MAX_LAYERS
These values MIN_DEPTH, MAX_DEPTH and VIEW_MAX_LAYERS are coupled, so to
avoid mismatch, it is better to derive these values from an unique value
2024-12-30 16:59:32 +01:00
Alex Shvartzkop
55ca13e7cf Revert "Support hidpi in Cairo GAL canvas; performance improvements."
This reverts commit 8e90063258.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19150
2024-12-02 22:44:20 +03:00
Seth Hillbrand
9e72d426db Remove C macro in favor of class template 2024-11-21 18:04:23 -08:00
John Beard
1a86982a2a Avoid enum name conflict on MacOS. 2024-11-05 08:20:37 +08:00
John Beard
dbf68a80b8 GAL: also scope layer depth push/pops
This means that an early return or an exception between
a manual Push/Pop (or an omission of the Pop) cannot
corrupt the layer stack.

It also means the GAL doesn't have to maintain its own
stack (with the in-scope GAL_SCOPED_ATTRS taking that role).

Reomve the Push/PopDepth functions, as they're only ever
used in pairs, and doing it manually needs more care.
2024-11-04 20:41:44 +08:00
John Beard
3549b77530 Ruler: fix colours when not the same as the cursor strings
Implement a simple RAII GAL attribute save/restore
class that handles putting the GAL back the way it was found.

This makes draw methods easier to write, as they don't need
to worry if a called method will upset the attribute context
(as long as the caller saves the context, or the callee does).

Obviously not a good idea to use in tight loops, but when text
is involved, this is negligible!
2024-11-04 20:41:20 +08:00
Seth Hillbrand
be2a52dd2b Avoid GL ctx deadlock
Allow non-drawing routines to access error messages without dealocking
the load
2024-09-06 16:00:49 -07:00
Marek Roszko
89a3b7baa5 Move some things starting from reporter to kicommon 2024-09-02 21:15:14 -04:00
Mark Roszko
c19aa8170b Revert "Move some things starting from reporter to kicommon"
This reverts commit 3d893254e9
2024-08-28 01:21:40 +00:00
Marek Roszko
3d893254e9 Move some things starting from reporter to kicommon 2024-08-27 20:33:08 -04:00
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