From: Erik V. <eri...@xs...> - 2011-06-11 10:37:59
|
Stefan, Thanks for picking this up. I knew it had to be done, but was indeed trusting upon you. Erik. > -----Oorspronkelijk bericht----- > Van: Stefan Frey [mailto:ste...@we...] > Verzonden: zaterdag 11 juni 2011 8:08 > Aan: Development list for Rails: an 18xx game > Onderwerp: Re: [Rails-devel] Background Maps > > The background map can now be activated in the configuration menu in the > Map/Report section. > The required changes are summarized below for future reference. > I will move this example to the wiki with some more instructions on the > configuration menu. > Stefan > > > To be supported in the configuration menu a new entry requires the > following: > A) An XML definition in data => Properties.xml > > B) A default value in data.profiles => default.profile > > C) A menu text in LocalisedText.properties Prefix is Config.label. followed by > the property name > > For this example here: > A) > <Property name="map.image.display" type="BOOLEAN" /> in section UI > > B) > map.image.display=no > > C) > Config.label.map.display=Display background map > > > > > On Tuesday, June 07, 2011 06:04:37 pm Erik Vos wrote: > > OK, I have committed the current code, which includes an SVG > > background map for 18EU (contributed by Bill Rosgen, IIRC). > > > > To enable seeing the map, one entry needs be added to your custom > > my.properties file (I haven't tried to update the configuration menu yet): > > - map.image.display=yes (default no, in which case everything works > > as before). > > > > I have included Bill Rosgen's patch to highlight selected hexes > > somewhat differently. Currently, it only affects display when the map is > used. > > The original highlighting looks ugly in this case. > > > > Please don't Zoom in serious play when the map image is used: it does > > not yet work as it should. When I try, the tiles rescale correctly, > > and so does the map image, but the latter soon gets out of sync. > > > > It's not clear to me how JSVGCanvas rescaling+resizing should be > > programmed the right way. A scaling affine transform works fine, which > > is what I used initially. But it not change the canvas size, so part > > of the map becomes invisible on zooming in. Only setting the canvas > > bounds (setBounds()) initially does the whole job, and this is what > > I'm currently using. But on repeated zooming actions, it seems to > > rescale the map image only every other time. Doing both (scale and > setBounds) upscales the map twice. > > > > It may be a matter of timing, and perhaps some listener should be > > invoked, but I cannot find any pointer on what exactly would be needed. > > > > Erik. > > > > > -----Oorspronkelijk bericht----- > > > Van: Erik Vos [mailto:eri...@xs...] > > > Verzonden: dinsdag 7 juni 2011 13:57 > > > Aan: 'Development list for Rails: an 18xx game' > > > Onderwerp: Re: [Rails-devel] Background Maps > > > > > > I fully agree that this is the way to go for the future. > > > In the meantime, I will commit my and some of Bill's work on the map > > > image integration (imperfect as it currently is), trusting that you > > > will ultimately also be able to integrate SVG map images into your work. > > > > > > Erik > > > > > > > -----Oorspronkelijk bericht----- > > > > Van: Adam Badura [mailto:ab...@o2...] > > > > Verzonden: dinsdag 7 juni 2011 7:38 > > > > Aan: Development list for Rails: an 18xx game > > > > Onderwerp: Re: [Rails-devel] Background Maps > > > > > > > > OK. Great. Then I shell continue this work. Yet I cannot promise > > > > when it will be done. But I will try to report on progress every > > > > now and then. > > > > > > > > Adam Badura > > > > > > > > -----Oryginalna wiadomość----- > > > > From: brett lentz > > > > Sent: Tuesday, June 07, 2011 6:31 AM > > > > To: Development list for Rails: an 18xx game > > > > Subject: Re: [Rails-devel] Background Maps > > > > > > > > I think this is an excellent direction to continue working on. > > > > > > > > The patch looks like it consolidates a bunch of code into a couple > > > > of classes, which looks good on first glance. > > > > > > > > I'd definitely like to see the finished patch once you're ready > > > > for it to be merged into the codebase. > > > > > > > > ---Brett. > > > > > > > > On Mon, Jun 6, 2011 at 2:45 PM, Adam Badura <ab...@o2...> wrote: > > > > > 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 > > > > > ---------------------------------------------------------------- > > > > > ---- > > > > > -- > > > > > -------- EditLive Enterprise is the world's most technically > > > > > advanced content authoring tool. Experience the power of Track > > > > > Changes, Inline Image Editing and ensure content is compliant > > > > > with Accessibility Checking. > > > > > http://p.sf.net/sfu/ephox-dev2dev > > > > > _______________________________________________ > > > > > Rails-devel mailing list > > > > > Rai...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > ------------------------------------------------------------------ > > > > ---- > > > > -------- EditLive Enterprise is the world's most technically > > > > advanced content authoring tool. Experience the power of Track > > > > Changes, Inline Image Editing and ensure content is compliant with > > > > Accessibility Checking. > > > > http://p.sf.net/sfu/ephox-dev2dev > > > > _______________________________________________ > > > > Rails-devel mailing list > > > > Rai...@li... > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > ------------------------------------------------------------------ > > > > ---- > > > > -------- EditLive Enterprise is the world's most technically > > > > advanced content authoring tool. Experience the power of Track > > > > Changes, Inline Image Editing and ensure content is compliant with > > > > Accessibility Checking. > > > > http://p.sf.net/sfu/ephox-dev2dev > > > > _______________________________________________ > > > > Rails-devel mailing list > > > > Rai...@li... > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > -------------------------------------------------------------------- > > > ----- > > > ----- EditLive Enterprise is the world's most technically advanced > > > content authoring tool. Experience the power of Track Changes, > > > Inline Image Editing and ensure content is compliant with > > > Accessibility Checking. > > > http://p.sf.net/sfu/ephox-dev2dev > > > _______________________________________________ > > > Rails-devel mailing list > > > Rai...@li... > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > ---------------------------------------------------------------------- > > ----- > > --- EditLive Enterprise is the world's most technically advanced > > content authoring tool. Experience the power of Track Changes, Inline > > Image Editing and ensure content is compliant with Accessibility Checking. > > http://p.sf.net/sfu/ephox-dev2dev > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image Editing > and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |