This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

Map Coordinates

Map Coordinates

Any object on a map will have a position defined by the location of the top left corner of the item, stored as $Xpos and $Ypos; the icon is then drawn to $Width and $Height from that location.

Tinderbox map co-ordinates differ slightly from normal X/Y graphing. The X axis is the same - positive to the right of zero, negative values to the left. However, the Y axis is flipped with values up the page from zero being negative and downwards being positive. Why the change?

It makes sense if you take into account the fact that Tinderbox starts a new map by setting the top left corner of the map window to {0,0} adding noted into the bottom right quadrant of the map, populate it right-wards and downwards. In Tinderbox's co-ordinates this quadrant uses positive X and Y values rather than positive X and negative Y in a more conventional graphing method.

Thus the first items on any map are using positive values for $Xpos and $Ypos. The accompanying image is thus a bit misleading as Tinderbox map - without any manual user intervention - will fill the bottom right quadrant of the map. A slight exception to this is that if a note is dropped onto a (non-container) note this first child item is placed at {-2,-0.5} on the new child map. However subsequent content is added down and right, i.e. in the bottom right quadrant of the map.

In general use, Tinderbox's 'reverse' polarity of the Y axis will be hidden from the user. The facts are only really important if the document is being scripted and items need to be precisely positioned. This co-ordinate system also allows for potentially infinite maps - Tinderbox can 'add' more map in any direction as needs be without having to reset the frame of reference.

At normal zoom level 1 map unit equates to 32 pixels.


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Misc. User Interface Aspects : Map view interface : Map Coordinates