To introduce myself to the MapTools code, I took it upon myself to add a rather simple feature that some others had expressed an interest in, and which I thought was within my domain of experience (graphics).
The full feature list is as follows:Screenshot
* File->Export->Screenshot As... now has the option of exporting the 'Entire Map'
** For GM's this is the entire extents of all objects (tokens, drawings, Fog-of-War, etc.)
** For players, this is the entire extents of the revealed Fog-of-War (so players can't use the screenshot to see where the map goes)
** The user can turn off certain layers and features to make the screen capture more useful. The Player has fewer options, of course.
** The exported screenshot is meant to be suitable for photoshopping (if Fog, visibility, and tokens are disabled).
** The screenshots are taken at the a magnification of 100%, or in other words, so that the background tiling texture and background map are at 1:1 with their original size.Edit Map
The really nifty Map->New Map... dialog can now be used to modify existing maps via Map->Edit Map. You can change anything about the map here, including the background image, fog color, tile texture, etc. This is useful for importing a modified screenshot to use as a new background image. It can also be used to salvage a map that you made a minor mistake on, or for making variations of an existing map, or whatever.Adjust Map Board
This works similar to Map->Adjust Grid... except it allows you to reposition the background image. This can be useful, for example, if you re-import an image but it has changed size slightly.Developer Notes
* I've tried not to leave any dangling bits: this is meant to be a solid and complete patch. There are certainly more features that could be added (changing magnification comes to mind), but none of the features I've added should be glitchy or tweaky. IF you find anything that is, please let me know so I can fix it.
* You can take some very large screenshots with this. I've taken 7000x7000 pixel images. If the program runs out of memory trying to create the image, it tries to fail gracefully, but I'm not a Java expert so I can't guarantee the memory manager won't throw up later. If anyone knows how to do a test before trying a memory allocation, I'm all ears.
* I did implement client-server methods so changes to the zone are reflected to the clients. Note however, that using Edit Map... will cause the entire zone to be deleted from the client, and then resent to the client. This will necessitate the players (or GM) switching the client to that zone if they were previously looking at it. (I couldn't figure out how to check which zone a client was looking at, so I didn't want to force the client to switch to the updated zone, in the event they were looking at something else.)
* There is a confusing assortment of techniques used to notify/invalidate/flush various objects related to rendering. I'm not experienced at Java, so I'm not in a position to judge whether this is good OO design or the result of evolving code. I had to do a lot of spelunking and I have to admit that when it came to these issues I felt like I was 'settling' on a solution rather than being 100% happy with it. I suspect that my unease is mostly due to the many rendering optimizations that are meant to make it draw faster, and my uncertainty about why the original coders chose e.g. ModelChangeEvents vs. invalidation flags in various circumstances. Nevertheless, I'm pretty sure I didn't change the behavior of the renderer: this should by readily confirmed by inspection. (A good diff program like Beyond Compare makes it easier than the Eclipse compare utility).Patch Notes
None of these features is essential: they are all utilities for the map-builders who want to tweak their maps for a higher quality appearance, or just to fix things after working on a map for a while. So I would understand a reluctance to include them in a future 1.3 build, as the goal is working toward stability (if I understand correctly). But if anyone wants to test out the patch, I would appreciate it. The Patch
File comment: .diff, .jfrm and .png files for the patch.
maptool1.3nb70.export.diff.zip [32.56 KiB]
Downloaded 51 times
Attached is a patch (diff) from version 1.3b70. If you have the Eclipse environment working, r-click on the maptools projects, select Team->Apply Patch... and choose this diff file. In addition, there are several non-text files (also attached) you need to manually copy into the correct file locations. Two are Abeille forms and the other is an icon for control panel tool.