Tinderbox v10 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 will, without any manual user intervention, 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.

Map co-ordinates are also referred to as map units, which are used by a number of attributes to store portion or size related data.

At normal zoom level 1 map unit equates to approximately 32 pixels (this may vary on more modern systems).