Commit Graph
136 Commits
Author SHA1 Message Date
Thomas Geymayer 37bc43c7aa canvas::Path: support for stroke-opacity and fill-opacity 2018-01-29 09:07:04 +01:00
Thomas Geymayer 4edd3f45b7 canvas: Refactor and protect against expired pointers 2018-01-28 15:57:14 +01:00
Thomas Geymayer 087ea4c5f3 canvas: Refactor with C++11 2018-01-28 00:49:05 +01:00
Thomas Geymayer 5a72a7d9f4 canvas: Refactor Path::addSegment with std::initializer_list 2018-01-16 09:01:55 +01:00
Richard Harrison 854881bba2 Prevent nullptr exception. Had this happen once. 2017-12-04 07:30:48 +01:00
Stuart Buchanan b57dca66be Handle case where no tranform matrix exists. 2017-10-13 17:35:21 +01:00
Stuart Buchanan a800189c25 Add support for Slippy Map Canvas layers.
- Add so-called Web Mercator projection and ability to choose
  projection for a Canvas Map.
- Add supporting functions for Slippy Maps (i.e. OSM)
2017-09-28 15:36:48 +01:00
Richard Harrison 6f0c7da6ad OSG 3.5.x support 2017-03-30 03:58:27 +02:00
James Turner c170f576b6 Ensure <simgear_config.h> is always included.
This is going to become important soon - prep for enabling SIMGEAR_SHARED on Windows.
2017-03-28 09:36:53 +01:00
Florent Rougon d39a56d4fb Add missing include: <cctype> for unary std::islower()
Thanks to Ron H. for the report.
2016-12-18 11:02:01 +01:00
James Turner 2f21b582cd Canvas image fill and source rect setters.
C++ code can set the fill and source rect directly.
2016-12-16 19:14:44 +00:00
James Turner b29536f8b7 Set Canvas element transforms from C++
Also allow transforms to be disabled.
2016-12-16 19:14:44 +00:00
James Turner 039f9920db Direct rect support. 2016-12-16 19:14:44 +00:00
James Turner 7c254e9c04 Native SVG path-data parsing in the Canvas.
This substantially cuts down the amount of properties needed when
importing SVG elements into Canvas paths.
2016-12-16 19:14:44 +00:00
James Turner 919c25769c Quiet a canvas message. 2016-11-30 12:18:44 +00:00
James Turner a3f1bb546f HTTP request cancellation
- replaces abort() with something more structured.
2016-04-14 09:16:36 +01:00
James Turner 2e1f01a86a Use ref-ptr in canvas adapter getImage
Adjusted while investigating missing tooltip texture with recent
OSG versions.
2016-03-26 19:55:37 +00:00
Thomas Geymayer 00a20409f7 Canvas: use weak pointer to protect parent element access.
Using a weak pointer is the best way to ensure no invalid
pointer is used. This also fixes a possible crash in
simgear::canvas::Element::getParentStyle on destructing
canvas elements.
2015-09-30 11:54:19 +02:00
Thomas Geymayer 9ea772f938 canvas::Map: remove rotation matrix on removing HDG node.
Return to previous rotation if autorotation to HDG is
disabled/removed.
2015-06-02 18:24:31 +02:00
Tim Moore 8b351520bd Off-by-one error in the OSG_VERSION_LESS_THAN macro
I was confused about when the version number gets bumped in OSG sources...
2015-04-21 00:06:22 +02:00
Tim Moore 51ff30f386 changes for OSG 3.3.4 and later
The public interfaces to osgText and osg::GLExtensions changed.
2015-04-19 22:45:59 +02:00
Thomas Geymayer ca7acb1f2c canvas::Map: Property to keep children aligned to given hdg.
Setting the 'hdg' property on child elements will rotate
them with respect to the heading set on the map projection.
2015-02-26 22:34:21 +01:00
Thomas Geymayer 85090180d0 canvas::Text: fix global StateSet and line start cursor pos with empty line. 2014-08-31 19:24:58 +02:00
Torsten Dreyer 3ca7369fb2 Canvas: add stroke-linejoin handling for path elements 2014-08-26 00:08:35 +02:00
Thomas Geymayer 4f94c22241 Canvas: add method clearFocusElement. 2014-08-25 21:49:21 +02:00
Thomas Geymayer e1791b3006 canvas::Text: clean up and expose character/cursor positions. 2014-08-23 15:54:07 +02:00
Thomas Geymayer 68d0891665 Canvas: fix element mouse hit detection with OSG 3.3.2. 2014-08-10 15:37:43 +02:00
bcoconni 14f2f9e917 Added some OSG headers for the correct evaluation of the OSG_VERSION_LESS_THAN macro. 2014-08-09 19:53:19 +02:00
Thomas Geymayer 791273c61d Update for OpenSceneGraph 3.3.2 API changes. 2014-08-09 18:13:45 +02:00
Thomas Geymayer 3bcd0bafd5 Lots of (mostly) doxygen fixes/cleanup. 2014-08-01 00:13:25 +02:00
Thomas Geymayer f41b18f064 Improve (mostly Canvas event related) documentation. 2014-07-29 23:57:59 +02:00
Thomas Geymayer c5d649aa0b Canvas: basic Keyboard event support (with input focus). 2014-07-29 22:22:20 +02:00
Thomas Geymayer 64ac22f50c Canvas: warn for missing tff and png plugins. 2014-07-27 12:11:09 +02:00
Thomas Geymayer 719ee36f5c Canvas: backdrop/stroke option for text (based on Gijs patch). 2014-07-27 11:05:49 +02:00
Thomas Geymayer 557e4f75b5 canvas::Layout: support for hiding items. 2014-07-21 00:25:59 +02:00
Thomas Geymayer f6b16e2ba8 canvas::Element: floating point scissor coordinates.
GL_SCISSOR itself only supports integer coordinates, but
with reference frames different from GLOBAL transforms
influence the position of the clipping frame, possibly
resulting in wrong positions due to too low precision.
2014-07-19 20:52:17 +02:00
Thomas Geymayer 6200b160ec canvas::Element: fix cleanup (and hopefully crash) 2014-07-01 12:09:55 +02:00
Thomas Geymayer 2c41c25fcd canvas::Text: get maximum width (if displayed on a single line). 2014-06-17 16:12:29 +02:00
Thomas Geymayer 82d5c605e5 canvas::Element: check if element is valid. 2014-06-15 16:30:57 +02:00
Thomas Geymayer 36cb7a752b canvas::Text: add heightForWidth method. 2014-06-13 00:08:57 +02:00
Thomas Geymayer c54e3f8101 canvas::Image: allow aspect ratio preserving display. 2014-06-08 02:16:07 +02:00
Thomas Geymayer e302ad092e canvas::Image: abort http requests if image is destroyed. 2014-06-05 17:25:12 +02:00
Thomas Geymayer 7a65d42a4c Canvas: fix transformation of clip rect. 2014-06-05 16:07:09 +02:00
Thomas Geymayer b36cdebe8b Canvas: basic layouting system.
Support for vertical and horizontal layouts. More layouts and
widgets can be created using Nasal.
2014-05-31 02:40:59 +02:00
Thomas Geymayer 0b21181f1a Canvas: allow dispatching events to Canavs itself 2014-05-29 16:34:33 +02:00
Thomas Geymayer 6db07373ee PropertyBasedElement: extend HTML5 (Canvas) data props interface
Allow check if property exists and removing properties.
2014-05-29 01:22:35 +02:00
Thomas Geymayer 36ae8cdce3 Update doxgen config and some comments. 2014-05-29 00:27:50 +02:00
Thomas Geymayer d77ba7d2db canvas::Element: setter/getter for HTML5 style data-* properties. 2014-05-28 18:11:32 +02:00
Thomas Geymayer 6e58fdac85 canvas: exclude data-* properties from triggering an update.
Allows using data-* properties on canvas and elements,
similar to HTML5, without triggering a new rendering of
the canvas.
2014-05-27 17:56:46 +02:00
Thomas Geymayer 9c421d55a9 Canvas: support for custom events and event dispatching. 2014-05-19 00:17:23 +02:00