From: Adam B. <ab...@o2...> - 2011-06-06 21:46:06
|
Sorry for the delay but I decided to adapt the patch to current code revision and have a look whether it does what I recall it did. Also I removed some additional works on symbols which I was doing along (this was the reason to start this work) but would be only distracting now. The code is mostly not documented as it is a working patch. Its not also "clean". But it does show that SVG Document isn't that hard. (To scroll or zoom use standard Batik components ways: Shift/Ctrl + moves with mouse buttons pressed.) So what do you think? Should I continue my work in this area? Adam Badura -----Oryginalna wiadomość----- From: Erik Vos Sent: Monday, June 06, 2011 2:43 PM To: 'Development list for Rails: an 18xx game' Subject: Re: [Rails-devel] Background Maps Adam, Congratulations with your second child! I'm certainly interested to have a look at your code, to check if I can merge it with my map display code. Some more comments below. > -----Oorspronkelijk bericht----- > Van: Adam Badura [mailto:ab...@o2...] > > I was working on moving entire drawing to SVG (and this was one of the > reasons I tried to push Batik 1.7). But recently my second child was born > and > there is some little chaos in my life with not much time for such tasks. > I still have SVN Patch yet it is already conflicting at some places with > new > code. > > What I managed to get was to create an SVG document containing map > (all > the tiles, either from map or track tiles). It looked significantly better > than our > previous drawing mechanism. While it was much less and much simpler code. > Also it scaled nicely. > > What the code was missing was: > (1) drawing station tokens, > (2) drawing train paths, > (3) handling scaling and scrolling well, > (4) support tile selection. > > First two would likely require some "hacking" as there is no easy way > currently to do it in SVG Document as there is not "specification" of > tracks > and stations on an SVG tile. But previous code did it somehow and I guess > that solution could be used with SVG Document as well until (if ever) SVG > tiles will receive better description. (That is a topic interesting on its > own...) The tracks and the token spot locations are also (somewhat cryptically) defined in Tiles.xml, and these definitions are currently used to draw the train paths and tokens. For the time being (or perhaps forever) that can be left as is, drawing these objects in the top layer of the JLayeredPane that I'm currently using. However, that would still require achieving correct alignment of the two layers after zooming. > I tries to handle third by using JSVGSrolledPane (or something called > similarly) but didn't achieve much. Then I had to interrupt my > investigations. I have also been thinking about JSVGScrolledPane, but I think using that will only become possible once we manage to do all drawing via JSVG. > Fourth should be easy as Batik provides some events to detect this. I > expect this could be even easier then current mouse handling. Borders > around selected or marked tiles could likely be achieved easily with CSS > in the > SVG Document. Sounds good. Erik. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |