Jeff Young
ffa6adec96
Add a cache for TrueType contours and triangulation data.
...
Also returns minimumSegmentLength to its former value as
it doesn't appear to be required to fix
https://gitlab.com/kicad/code/kicad/-/issues/11463 .
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16568
(cherry picked from commit 162e8962f7
)
2024-02-23 16:53:29 +01:00
Jeff Young
7fbeea0195
Allow smaller grid dots on Retina displays.
2024-01-19 20:37:27 +00:00
Jon Evans
e29baa75b4
Scale GAL grid with DPI
2024-01-19 12:20:13 -05:00
Alex Shvartzkop
5bd620d8f9
Support Bezier curve editing in eeschema.
2024-01-16 14:11:25 +03:00
Marek Roszko
21647f54e9
Rename the `gal` output to `kigal`
2024-01-13 11:35:59 -05:00
Jeff Young
5aae8e2fd0
Code cleanup.
2024-01-04 16:13:42 +00:00
Alex Shvartzkop
965576f2c6
Enable alpha test for bitmaps in OpenGL GAL.
2023-12-31 15:05:00 +05:00
Alex Shvartzkop
e8fabb58a6
Fix bitmap Z order in OpenGL GAL.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16482
2023-12-31 14:09:28 +05: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
Alex Shvartzkop
afa08b710c
Support transparent cursor colors in OpenGL GAL.
2023-11-29 04:04:22 +03:00
Alex Shvartzkop
00904e8e23
Set UNPACK_ALIGNMENT properly for RGB bitmaps,
2023-10-24 06:58:46 +03:00
Alex Shvartzkop
0e4553b1fa
Fix variable shadowing.
2023-10-24 04:25:31 +03:00
Alex Shvartzkop
977912dcd5
Fix up 75c758e5f4
for masked images.
2023-10-24 03:59:03 +03:00
Alex Shvartzkop
71d0c7f6af
OpenGL: Improve logic when bitmap cache memory is exhausted.
...
Don't remove the front entry, as it will likely be needed for the next bitmap.
Instead, implement neuristics based on access times.
2023-10-24 03:36:51 +03:00
Alex Shvartzkop
ccc29e9776
Improve bitmap caching performance.
2023-10-24 01:27:53 +03:00
jean-pierre charras
42384bcbd0
OPENGL_GAL: ensure 0 sized rect with thickness is shown (already shown by Cairo)
...
Fixes #15850
https://gitlab.com/kicad/code/kicad/-/issues/15850
2023-10-10 18:31:10 +02:00
Marek Roszko
4746bde4b3
gal as a shared lib, gaasl!
2023-09-26 22:31:31 -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
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
Alex
66922b3bd2
Add hacks for EGL on Wayland
2023-09-14 03:54:01 +03:00
Alex Shvartzkop
ead44d58a0
Fix bezier curves drawing in schematic/libedit.
2023-09-09 20:28:49 +03:00
Marek Roszko
7505fd0f37
Profile can live in core
2023-09-07 07:47:01 -04:00
Marek Roszko
19db0f943f
Restore gal recursive link to common
2023-09-06 21:59:01 -04:00
Marek Roszko
81c069c1a3
Lets see if any platform barfs dropping gal's link to common
2023-09-06 20:33:51 -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
Marek Roszko
a7a642e090
Remove one errant gal dependency on python
2023-09-06 18:41:13 -04:00
Marek Roszko
4d77fd48ef
Shove thread_pool to core
2023-09-06 17:50:12 -04:00
Alex Shvartzkop
16c35857bf
Fix arcs drawing in Cairo.
2023-08-25 00:09:56 +03:00
Seth Hillbrand
db8e15ce88
Require wxWidgets 3.2
...
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00: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
5936960c1e
Allow to reverse the mouse wheel movement
...
This MR adds a CheckBox in the preferences window to reverse the
horizontal pan direction
2023-08-17 19:17:50 +00:00
Rastersoft
43fe1eec84
Unify mouse movements
2023-08-17 18:20:22 +00:00
Alex Shvartzkop
717ee350c8
Support >180 deg arcs in schematic.
2023-08-07 14:18:38 +03:00
Jeff Young
5e112ca78e
ADDED: parameterize font metrics and allow customization of overbar height.
2023-08-06 20:57:41 +01:00
Alex Shvartzkop
6a123e2381
OpenGL GAL: fix reserved vertices calculation in drawSegmentChain.
2023-07-10 09:32:21 +05:00
jean-pierre charras
27072e52f7
Fix a compil and Coverity warnings
2023-07-07 10:28:01 +02:00
Alex Shvartzkop
4cb7e92aad
Fix overlapping transparent images covering each other in OpenGL GAL.
2023-07-03 02:15:05 +03:00
Alex Shvartzkop
f286015bc7
Fix bitmap transparency in Cairo GAL.
...
Cairo ARGB32 format needs alpha pre-multiplied with color.
2023-07-03 02:15:05 +03:00
Kuba Sunderland-Ober
1edb9bb0ce
Get rid of VECTOR2U.
2023-06-28 20:48:07 +00:00
Alex Shvartzkop
eaf65f7d53
Avoid deadlock when OpenGL context can't be created.
...
Previously, with aContext == nullptr, the mutex would lock, but not unlock.
Then it got deadlocked inside OPENGL_GAL dtor.
2023-06-11 18:59:00 +03:00
Jeff Young
5875f89531
Centralize text size clamping.
...
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Marek Roszko
6e468c5ce9
Fix more warnings
...
Needless const and out of order initializer
2023-05-29 23:01:58 -04:00
Jeff Young
f35a88ce0b
Cache LIB_PIN text extents for performance.
...
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.
And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.
Also reverts using the cache for drawing-sheet text. The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).
And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14822
2023-05-27 16:32:11 +01:00
Jeff Young
4ed267394a
Outline font performance improvements.
...
1) Don't fracture font glyphs when generating them; we're going
to fracture during triangulation anyway.
2) Don't check for self-intersection when deciding to fracture.
It costs nearly as much as the fracture does.
3) Cache drawing sheet text.
4) Use the current font when checking for cache validity.
5) Parallelize glyph triangulation.
6) Don't invalidate bounding box caches when offset by {0,0}
7) Use the glyph cache when generating text effective shape.
8) Short-circuit NormalizeJustification() if its center/center.
9) Don't triangulate for GuessSelectionCandidates()
10) Avoid sqrt whenever possible.
11) Pre-allocate bezier and SHAPE_LINE_CHAIN buffers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14303
2023-05-27 01:35:40 +01: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