bjorn/tiled — pull request #600 by KillaW0lf04 (2014-01-26 17:00:35+00:00)
Title: Add ability to set ImageLayer position from the property browser

Hi, I thought I would go ahead and add support in Tiled to set the x and y position of an ImageLayer.

Currently these changes only allow the position to be set from the property browser when selecting the layer (i.e. you can use the mouse to "drag" the image layer to a new position - but i'm not even sure this would be possible).

There are a few things I noticed:
* ImageLayer already has 2 fields x() and y() but these are *never* used and always set to 0. In addition to this, the MapScene object never makes use of these values to specify the position when rendering.
* I have noticed that mapreader.cpp attempts to read the x and y values from a *.tmx file - but these can never be set within tiled and mapwriter.cpp does not make any attempt to write them either. The only way these would ever be read would be if you manually insert x="10" y="10" in the element for example. As I mentioned in the point before, these dont actually do anything though.

Because propertybrowser uses *PositionProperty* for specifying positions on various objects in tiled, I decided to add a position property to ImageLayer instead of using x() and y(). This allows propertybrowser to immediately take advantage of the value without the need to add another enumerator type.

I would also like to ask what the original scope for ImageLayer was? I noticed that it is written into the *.tmx file in such a way as to suggest it could support multiple images on one layer.

If you do not agree with any of the choices I made above or if you think something could be done better in another way let me know!