Alex Shvartzkop
c4a7af8a47
Cairo GAL: fix endianness check.
2024-02-28 04:11:02 +03:00
Alex Shvartzkop
d359fb8ab9
Cairo GAL: reduce buffer allocation sizes.
...
cairo_format_stride_for_width() result is in bytes.
Also removes unneeded extra width.
2024-02-28 03:50:17 +03:00
Alex Shvartzkop
5618a6925d
Cairo GAL: improve empty canvas performance (-80% CPU)
2024-02-28 03:50:17 +03:00
Alex Shvartzkop
16c35857bf
Fix arcs drawing in Cairo.
2023-08-25 00:09:56 +03: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
Alex Shvartzkop
717ee350c8
Support >180 deg arcs in schematic.
2023-08-07 14:18:38 +03:00
jean-pierre charras
27072e52f7
Fix a compil and Coverity warnings
2023-07-07 10:28:01 +02: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
Marek Roszko
6e468c5ce9
Fix more warnings
...
Needless const and out of order initializer
2023-05-29 23:01:58 -04:00
Marek Roszko
aacc9746e3
Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere
2023-02-18 22:57:18 -05:00
Ian McInerney
1683e552f7
Add/fix some variable initializations
2022-09-25 00:48:38 +01:00
dsa-t
bd8b737c44
GAL: Do better job at reserving vertices.
2022-09-14 16:07:47 +00:00
Mike Williams
3669cb4673
PCB Editor: Add User Background Images
2022-07-14 11:23:23 +00:00
Mike Williams
857990a883
Hierarchy: turn into a left side pane
...
Drop auto-closing option as well.
2022-06-02 21:56:17 +00:00
Jeff Young
4a05b36bc6
Prefer EDA_ANGLE to naked radians.
2022-01-20 21:10:04 +00:00
Jeff Young
e84c574830
Some more EDA_ANGLE cleanup.
2022-01-16 19:16:18 +00:00
Jeff Young
7d032f9c2f
Outline font rendering for Cairo, plotter, printer and 3D viewer.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young
04c76f10e9
Performance enhancements for fonts.
2022-01-08 16:47:45 +00:00
Jeff Young
8e4a4306c7
Go back to using inter-character spacing from the stroke font.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/1078
2022-01-04 00:46:08 +00:00
Jeff Young
89c0f8e297
Move to new font engine.
2022-01-02 14:57:03 +00:00
Tomasz Wlostowski
b59ee13fcc
GAL: made Begin/EndDrawing calls public to have more control over timing of rendering context creation/destruction
2021-11-29 23:30:10 +01:00
jean-pierre charras
19fc8c6d98
CAIRO_GAL: fix incorrect display of segments in outline mode in flipped board view
...
Fixes #9633
https://gitlab.com/kicad/code/kicad/issues/9633
2021-11-15 10:12:10 +01:00
Seth Hillbrand
52bbfb9109
Remove dependency of dot size on linear mils
...
Changes a dot to be a square pixel (linewidth x linewidth). This allows
the removal of IU dependencies and ensures that a dot is always visible
on screen. Also makes sure that cairo is setting the current linewidth
during its stroke routines
Fixes https://gitlab.com/kicad/code/kicad/issues/9362
2021-10-10 09:40:26 -07:00
jean-pierre charras
5aea7b8123
Cairo: fix incorrect handling of arcs with angle >= 360 deg in some cases.
...
Fixes #9231
https://gitlab.com/kicad/code/kicad/issues/9231
2021-09-25 09:06:09 +02:00
Wayne Stambaugh
3b16c38756
Coverity issue fixes.
...
Fix Coverity issues 157138, 338547, and 338716.
2021-09-08 14:51:27 -04:00
jean-pierre charras
36048fa436
OPENGL_GAL::DrawArcSegment(): use a better number of segm to approximate the arc.
...
Previously, the count of segments used a magic number optimized for Pcbnew.
This is not good, and does not work well on Gerbview.
The count uses now a max error acceptable is approximation (5 microns in Gerbview and Pcbnew).
Fixes #9101
https://gitlab.com/kicad/code/kicad/issues/9101
2021-09-06 16:36:47 +02:00
Mike Williams
30987cebfe
Gerbview: fix cairo negative items and implement real differential mode
...
Layers with negative objects need to be drawn in a subsurface before
copying so they don't _CLEAR the draw items below them when a negative
object is drawn.
Differential layers are basically the same thing only they use a
different copying operation onto the layers below.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1863
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4495
2021-08-31 12:43:53 +00:00
Jeff Young
e62969d007
Move zone fracture display mode to AdvancedCfg, and add triangulation.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-26 18:57:35 +01:00
Wayne Stambaugh
bcd6bddfd4
Start expunging NULL.
...
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
Jonathan Haas
55679be2e3
Fix some typos across the codebase
2021-04-05 16:15:25 +02:00
Ian McInerney
e08387ce3d
Make the GAL responsible for the native cursor management
...
The native cursor must be set on the GAL canvas wx object,
not its frame (otherwise on GTK the cursor is only set
when we get a request for it from the WM and not immediately).
Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2021-04-05 02:36:12 +01:00
Jeff Young
812d38736e
Naming conventions.
2021-03-19 23:06:19 +00:00
Wayne Stambaugh
e7227a4f21
GAL code cleaning.
2021-02-16 17:25:27 -05:00
Marek Roszko
9770ba9739
Fix odd/even check in cairo. Modulo 1 is always 0 on ints.
2021-01-31 11:59:49 -05:00
Jeff Young
0a7ef25453
Replace STROKE_FONT performance fix, this time with correct type.
...
Also this time with a fixed Cairo implementation and an implemented
BASIC_GAL implementation.
Fixes https://gitlab.com/kicad/code/kicad/issues/6447
2020-11-20 11:24:52 +00:00
Marek Roszko
2d33b23530
Fix formatting
2020-11-07 09:51:09 -05:00
Marek Roszko
df49e0bb0d
Don't leave dangling pointers
2020-11-07 09:48:59 -05:00
Seth Hillbrand
ae1004776f
Correct Cairo GAL dot rendering
...
This matches the OpenGL dot rendering. Patch from dsa-t with minor
changes
Fixes https://gitlab.com/kicad/code/kicad/issues/5832
2020-10-21 12:31:21 -07:00
Mikolaj Wielgus
2d7a2a9658
Fix grid dots not appearing due to below-unity drawing width
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5630
2020-09-29 01:23:39 +02:00
Seth Hillbrand
80af7b3158
Fix GAL check to account for shared function
...
Cairo Polyline and Polygon draw functions share a common routine. While
Polygons must have 3 points to allow triangulation, a polyline (like our
text) need only have 2
2020-08-21 15:18:25 -07:00
Seth Hillbrand
7fc222db98
GAL: Check that polygons have at least 3 points
...
This resolves a crash when passing an empty polygon and alerts debug
users to possible generation cases when bad polygons are created.
Thanks for Frans Zellman
(https://gitlab.com/kicad/code/kicad/-/merge_requests/365 ) for
identifying the issue.
2020-08-21 09:36:41 -07:00
jean-pierre charras
9f20c61fa7
Remove creation on the fly of a wxPaintEvent instance (fix previous commit).
2020-07-15 14:56:35 +02:00
jean-pierre charras
6366aa3ede
Remove creation on the fly of a wxPaintEvent instance (final step).
...
This is not allowed in 3.1.4 wxWidgets.
2020-07-15 12:58:43 +02:00
Jon Evans
23c1baae8e
Defer image surface destruction until next paint
...
Fixes #4043
(cherry picked from commit dbf786e456f2792476791caf9dadfeb43e9ab383)
2020-04-02 14:36:57 -04:00
Marcus Comstedt
55ac575a88
Cairo GAL: fix incorrect use of pixman formats
...
Fixes https://gitlab.com/kicad/code/kicad/issues/3970
2020-03-03 18:07:30 +00:00
jean-pierre charras
ad3c4b37ab
Fix a few coverity warnings
2020-02-01 15:15:51 +01:00
Ian McInerney
13b6028e1b
Refactor all math into a new kimath library
...
* Split up the thirdparty code into the thirdparty folder (#3637 )
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906 .
2020-01-07 17:12:59 +00:00
jean-pierre charras
01553a6bd1
FIX: add parameter to GAL::DrawCurve to control the curve to polyline conversion. Cairo supports curves, but not Opengl, that needs a conversion to polyline. This control allows optimization in conversion
2019-11-09 11:41:29 +01:00
jean-pierre charras
d77ba30a95
Replace __WXDEBUG__ (improperly used) by DEBUG in some #define.
...
__WXDEBUG__ comes from a build option of wxWidgets,
and is not related to a Debug versus Release Kicad build.
2019-10-14 11:17:38 +02:00
Seth Hillbrand
c3e07a5886
Cleaning Cairo GAL
...
Removed extra allocations that were not used.
Removed unneeded shared pointer
Corrected storage type from RGB to ARGB
2019-08-28 19:29:47 -07:00