1
0
Fork 0
Commit graph

35 commits

Author SHA1 Message Date
Thomas Geymayer
f0927fc06d Canvas: Change default fill-rule to nonzero 2012-09-21 00:42:21 +02:00
James Turner
f7878cfd4d Fix a Clang warning in Shiva. 2012-09-19 15:55:49 +01:00
Thomas Geymayer
09ac319e87 Canvas: Don't crash on removing child hierarchie from map
Currently if a SGPropertyNode is removed from the property tree
only for this single node a childRemoved event is triggered. So
if we just check for a specific child to be removed, we will never
be notified. This commit manually triggers the event recursively
for all children but this should probably go directly into simgear.
2012-09-18 23:21:50 +02:00
Thomas Geymayer
9f5790c843 Canvas: Use seperate projection instance for each map 2012-09-18 00:33:36 +02:00
Thomas Geymayer
7463ebad1d Canvas: Only use cull callback if it's still valid 2012-09-01 16:50:21 +02:00
Thomas Geymayer
ced478cf95 Canvas: CSS like property value inheritance.
- Groups store property nodes for different styles and pass them
   to child elements on creation (No dynamic updates yet)
 - Use StyleSetter map instead of loads of if/else if statements
   for setting element styles.
 - Unify element style properties (Only use one property, instead
   of multiple like it has been with colors)
 - Fix: Create only one element per property node (Was two)
2012-08-23 20:00:13 +02:00
Thomas Geymayer
ec73c62da5 Canvas: Fix stupid off-by-one error 2012-08-13 20:29:08 +02:00
Thomas Geymayer
875b59952b Canvas: Bugfixes
- Fix dependency cycle
 - Correctly forward mouse release event
2012-08-13 14:11:26 +02:00
Thomas Geymayer
624522b426 Canvas: Don't crash if texture not available 2012-08-12 20:23:31 +02:00
Thomas Geymayer
948d87e561 Canvas: Basic support for window stacking 2012-08-11 23:38:04 +02:00
Thomas Geymayer
544784ca85 Canvas: Forward mouse events to elements.
- Use bounding box intersections to determine which element is
   hit.
 - Transform mouse coordinates to local coordinates.
 - Try to get osgText bounding box correct (or at least better)
2012-08-10 13:11:06 +02:00
Thomas Geymayer
288e7fa5ca Canvas: default image element dimensions to texture size 2012-08-09 21:58:55 +02:00
Thomas Geymayer
83bbd9e45c Canvas: Image/Window unifying and allow using canvas inside canvas.
- Refactor and unify common functionality of canvas::Window and
   canvas::Image
 - Make canvas::Image actually work
 - Allow using canvases inside canvas::Image
   * Use new canvas:// "protocol" to allow using canvases in
     place of images
 - Prepare for categorizing canvases:
   * Move canvases to /canvas/by-index
   * Later support linking to other nodes in subbranches of
     /canvas
2012-08-09 16:13:38 +02:00
Thomas Geymayer
350d508324 Clean up
- Replace deprecated boost::shared_static_cast with
   boost::static_pointer_cast
 - Use boost::ends_with in favor of own implementation.
2012-08-09 13:22:48 +02:00
James Turner
310ddbf8c5 Initial work on Image element for Canvas. 2012-08-05 22:43:01 +01:00
Thomas Geymayer
052d578483 Canvas: Fully remove Window drawable if destroyed 2012-08-05 18:06:56 +02:00
James Turner
f703882ffa Skeleton Nasal-Canvas integration.
This code is non-functional, but contains most of the stubs to show what's required to add property get/set access, convert to from ghost & C++ types, and manage ownership. Element derived classes & inheritance (e.g., methods on image/path/map elements) will follow, along with some actual functionality!
2012-08-02 12:18:38 +01:00
Thomas Geymayer
e980178213 Canvas: Fix warning and rename file. 2012-08-01 10:57:15 +02:00
Thomas Geymayer
8a6a234653 Canvas: First version of new Canvas GUI system.
- Refactor CanvasMgr into PropertyBasedMgr to be also used
   for the Canvas GUI system.
 - Get rid of tied properties in the Canvas system.
 - Add new placement type 'window' for placing canvases onto
   windows
 - Pass mouse events to Window class (only if cursor is over
   window)
 - Refactor canvas placement clean up
2012-07-31 23:19:23 +02:00
Thomas Geymayer
5f08e10c0a Canvas: Support for text selection.
- Expose nearest hit for text/character selection
 - Fix culling
2012-07-31 23:19:23 +02:00
Thomas Geymayer
91c3f63110 Canvas: UTF-8 support and more settings exposed.
- Allow hiding objects
 - Use UTF-8 encoding for text elements
 - Add paramter max-width to text elements
 - Support stroke-linecap for path elements
 - Fix mouse coords
 - Set better mipmap filter
2012-07-31 23:19:23 +02:00
Thomas Geymayer
e81db175f4 Canvas: Add new element type map for geo mapping.
- The new map element automatically transforms geo coordinates
   (lat, lon) to the according screen coordinates.
 - Currently one type of projection is supported
   (Sanson-Flamsteed projection)
2012-07-31 23:19:23 +02:00
Thomas Geymayer
373d511c69 Canvas: Allow using canvases as PUI widgets.
- Add new widget type canvas
 - Set canvas view dimension from the gui xml.
 - Expose mouse events to canvas widget properties.
2012-07-31 23:19:22 +02:00
Thomas Geymayer
26aeb84399 Canvas: Calculate bounding box for path elements.
- Add an update callback to calculate a bounding box for every
   path to ensure correct culling of paths.
 - Ensure OpenVG get's initialized even if elements are subject to
   culling.
2012-07-13 11:11:33 +01:00
Thomas Geymayer
580891f181 Rename tf elements for easier handling. 2012-07-13 11:11:29 +01:00
Thomas Geymayer
c5695f6f88 Fix setting global path options per path 2012-07-13 11:11:22 +01:00
Thomas Geymayer
0934ba859f Fix canvas clean up.
On clean up there are no parents any more and therefore the assertion
was triggered.
2012-07-03 16:29:44 +02:00
Thomas Geymayer
948dd2ab95 Add missing glx.h include and fix some warnings. 2012-07-03 15:58:05 +02:00
James Turner
a8fbfb17b4 Fix OS-X compilation. 2012-06-17 21:14:04 +01:00
Thomas Geymayer
569042acbd Allow filling paths and do some clean up/fixing. 2012-06-17 21:14:00 +01:00
Thomas Geymayer
c8e1433a5c Add ShivaVG sources 2012-06-17 21:13:54 +01:00
Thomas Geymayer
df768766d9 Canvas: basic support for OpenVG (path with stroke and pattern)
- Bugfix: Don't access children by index as it's not unique
2012-06-17 21:13:47 +01:00
Thomas Geymayer
023021a879 Expose character-aspect-ratio and do some clean up
- Fix stupid memory corruption bug
 - Fix bounding box calculations
 - Fix docs
 - Fix text size
 - Expose setting background color
 - Expose trigger for updating elements
 - Untie nodes if deleting according element
 - Allow deleting canvas, text and group elements
 - Allow creating groups as children of groups
2012-05-31 22:04:19 +02:00
James Turner
b5283fafb1 Fix Win32 build, hopefully. 2012-05-18 07:45:30 +01:00
Thomas Geymayer
d82fd7cc5f Basic 2D canvas implementation.
Support text and transformations for the moment, more
features to follow in due course.
2012-05-18 07:05:37 +01:00