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
Ian McInerney
8d86d94a4d
wxWidgets compatibility fixes
...
* Remove unneeded check
* Fix WX_GRID since upstream renamed a variable in 3.1.3
2019-09-05 08:11:44 -04: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
jean-pierre charras
533fdcf00a
Cairo GAL: fix incorrect arc position in mirror mode.
...
the previous fix (2e43c6c64e
) did not really work.
Add also comments to a few not yet documented methods.
Fixes: lp:1822772
https://bugs.launchpad.net/kicad/+bug/1822772
2019-05-08 14:24:26 +02:00
Seth Hillbrand
dae7b03465
gal: re-enable arc outline mode
...
Fixes: lp:1816373
* https://bugs.launchpad.net/kicad/+bug/1816373
2019-02-21 10:52:54 -08:00
Seth Hillbrand
066b1782bb
cairo: Fix grid display
...
Grid points were uneven in Cairo compared to OpenGL. This standardizes
the functions for grid types and simplifies the code
2019-02-21 10:49:56 -08:00
Seth Hillbrand
5af8d2d0a8
cairo: Fix rotated oval pads
...
Fixes: lp:1816428
* https://bugs.launchpad.net/kicad/+bug/1816428
2019-02-18 09:44:28 -08:00
Tomasz Włostowski
85a7ab7795
gal: minor cleanup & formatting
2019-02-16 20:25:10 +01:00
Tomasz Włostowski
bbee30671a
gal: pixel alignment hacks, works for Retina display too now.
...
gal: pixel alignment for Cairo.
gal: pixel alignment for OpenGL
Cleanup of pixel alignment patches
gal/opengl: more pixel alignment patches:
- works on Retina displays now
- pixel alignment for circles
- correct 1-pixel strokes
- fixed unfinished 1-pixel line ends
GAL: Restore antialiasing options in Cairo
GAL: Fix arc drawing
Removes DrawArcSegment, which drew arcs whose edge was optionally
stroked (a feature that we did not use). Fixes Cairo arc drawing issue
where arcs were not visible in pcbnew.
gal: further cleanup
gal: removed unused shader parameter
2019-02-16 20:03:13 +01:00
jean-pierre charras
83d851956c
classes MARKER rework: remove duplicate code. Better HitTest code (HitTest takes in account the actual shape)
2018-12-19 19:53:27 +01:00
jean-pierre charras
388397f97d
Protect TesselatePolygon() against degenerated polygons (less than 3 corners) to avoid crashes.
...
Use TesselatePolygon() to draw polygons in Gerbview instead of GLU tesselation, much slower.
Add helper methods in GAL to know if the current GAL engine is Cairo, OpenGL or something else,
useful to optimize drawing code.
2018-12-18 12:49:14 +01:00
Maciej Suminski
47d0eaa2c6
GAL: changed line width setting to float type
2018-10-31 19:17:30 +01:00
Maciej Suminski
e36f6b476d
Changed the CAIRO_GAL class hierarchy
...
There is a dedicated class for display (CAIRO_GAL) and another one
for printing. The common part has been moved to CAIRO_GAL_BASE.
2018-10-31 19:17:30 +01:00
Jeff Young
16925cc74e
Implement RAII locking for GAL updating.
...
Fixes a crash when typing fast in the place footprint filter box.
Also adds a bunch more checking to GAL locking, including making
sure the same person unlocks as locked, and preventing piece-meal
calls (the RAII objects must be used).
2018-10-26 23:02:05 +01:00
Tomasz Wlostowski
f82f310dd5
eeschema-gal: added EnableDepthTest() feature in GAL
2018-10-09 11:08:52 +01:00
Jeff Young
0309228276
Don't allow drawing to a zero-height or zero-width GAL canvas.
...
Fixes: lp:1793913
* https://bugs.launchpad.net/kicad/+bug/1793913
2018-09-22 22:06:40 +01:00
jean-pierre charras
fefc7b8172
GAL canvases: add DrawBitmap(), using a basic brute force algo for OpenGL, and a optimized code for Cairo. In this fix the brute force means draw each pixel as a rectangle. It works fine, but could be optimized.
2018-07-30 00:13:30 +02:00
Jon Evans
0b9b8d3e93
Add support for reversed draw order and Cairo negative draw mode
2017-09-25 13:35:01 +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
Maciej Suminski
ddf4f3b2bc
Remove not used cursor fields & methods in Cairo GAL
2017-03-22 10:37:43 +01:00
John Beard
b8edecc10f
Move cursor shape flag into GAL settings
...
The motivation here is to concentrate display options in the GAL display
settings, ready for removal of legacy canvases. Instead of having the
property as a member of the DRAW_FRAME, with the GAL canvas retreiving
it from there, it is now in the GAL_DISPLAY_OPTIONS struct, and both GAL
and legacy get it from there.
The options for setting cursor shape are then moved out of the general
options dialog, and into the GAL display options widget, where they can
be used in all GAL-aware programs.
GAL cursor shape works on GAL, but not legacy, so the option is now
available on OSX (but only affects GAL, and is labelled as such).
2017-03-22 10:24:48 +01:00
Jon Evans
3208d24ad4
Add DrawArcSegment() GAL method, to support drawing outlined arcs
2017-03-10 14:08:59 +01:00
John Beard
ddded86a06
Give all GAL canvases access to a GAL_DISPLAY_OPTIONS structure instance
...
Also loads the gal options when loading a canvas, as the canvas
otherwise might not register the initial settings.
2017-02-20 10:52:34 +01:00
Maciej Suminski
80956ef1e6
Added GAL::DrawPolygon(SHAPE_POLY_SET) & GAL::DrawPolyLine(SHAPE_LINE_CHAIN)
2017-01-27 19:08:32 +01:00
Maciej Suminski
a2a950fdae
Reduced the Cairo command entry size
2016-12-12 16:45:52 +01:00
Maciej Suminski
660e4ca9d4
Cairo group arguments are stored in a union.
2016-12-12 16:45:52 +01:00
Tomasz Włostowski
da28e163d2
Optimizations/fixes to the VIEW/GAL classes:
...
- much faster Cairo rendering (outperforms legacy)
- improvements in VIEW update handling
- fixed issue with grid rendering in flip view mode
2016-12-12 16:45:52 +01:00
Simon Richter
59c81976dc
Explicitly mark overriding functions.
2016-09-24 14:53:15 -04:00
Simon Richter
da5699de0a
Replace boost::shared_ptr with std::shared_ptr.
2016-06-29 11:09:55 -04:00
Maciej Suminski
3ca7026aa0
More robust checks for OpenGL canvas visibility.
2016-05-20 12:06:08 +02:00
Maciej Suminski
4951285a67
GAL::DrawPolygon() and GAL::DrawPolyline() variants that work with VECTOR2D array.
2016-01-20 15:16:39 +01:00
Maciej Suminski
65c116621d
Added support for changing the cursor size.
2014-07-09 15:10:32 +02:00
Bernhard Stegmaier
60a86853ec
Removed a few warnings.
2014-06-05 12:40:26 +02:00
Maciej Suminski
d27ea7895d
Moved background color settings from GAL to RENDER_SETTINGS. Added RENDER_SETTINGS::TranslateColor() to convert between EDA_COLOR_T and COLOR4D.
2014-05-14 10:35:12 +02:00
Maciej Suminski
597e98dbf4
Cursor is in world coordinates.
2014-02-13 20:23:28 +01:00
Maciej Suminski
f9f0b46b63
Small GAL refactorization, mostly correcting constness.
2014-02-13 19:31:27 +01:00
Maciej Suminski
bc305859b2
Mainly case changes.
2013-10-14 20:40:36 +02:00
Maciej Suminski
0ac3e1fbf2
Namespace KiGfx->KIGFX.
...
template<> -> template <>
Some more reformatting according to uncrustify results.
2013-10-14 16:13:35 +02:00
Maciej Suminski
bd8998d1da
Fixed cursor drawing for OpenGL.
2013-08-28 17:06:07 +02:00
Maciej Suminski
215f35e237
Added mouse cursor drawing.
...
Added flipping mode.
2013-08-27 18:08:32 +02:00
Maciej Suminski
89a138c09e
Added handling keyboard events for the Tool framework.
2013-08-21 17:37:27 +02:00
Maciej Suminski
43ae1cb98d
Smarter way of the overlay rendering (overlay is always refreshed, while cached&noncached targets only if the viewport or items have changed).
2013-08-19 11:02:38 +02:00
Maciej Suminski
bc69429a56
Added GetTarget() for GALs.
2013-08-06 14:57:48 +02:00
Maciej Suminski
190ed58568
Code refactoring.
2013-07-30 18:29:54 +02:00
Maciej Suminski
790a1f8563
Made GAL backends settings more consistent. Fixed grid line width in the OpenGL backend.
2013-07-30 17:09:06 +02:00
Maciej Suminski
4076f99332
Added a layer compositor for the Cairo backend.
2013-07-25 14:40:04 +02:00
Maciej Suminski
618a5f0e75
OpenGL multitarget rendering (compositing).
2013-07-23 18:39:07 +02:00
Maciej Suminski
5242fff9d7
Code refactorization. VBO_CONTAINER is split to [NON]CACHED_MANAGER, GPU_MANAGER and VERTEX_MANAGER.
2013-07-22 10:41:12 +02:00
unknown
4360860bee
Removed different styles of line caps and line joins, leaving only round caps & joins.
...
Fixed drawing stroked semicircles using OpenGL backend.
2013-07-01 14:39:27 +02:00
Maciej Suminski
332a7b4bd9
Groups are stored in map instead of deque, so it allows easier adding & removing.
2013-06-27 11:54:49 +02:00