--heightmap: generate the height map, in colors
--heightmap-grey: use shades of grey instead of colors
--sealevel <n>: define the sea level (below sea level is drawn in blue)
--heightmap-scale <f>: scale the heights by f (for the purpose of
color selection)
When generating a heightmap, a special colors file is needed,
that defines just the blocks that should be considered part
of the ground. That means that normally, any plants, special
nodes and water should not be included.
The option --tiles has two new possible values: 'block' and 'chunk'
'block' creates tiles corresponding to map blocks
'chunk' creates tiles corresponding to map chunks
(chunks are the unit of map generation).
An option --chunksize was added to manually override the chunk size.
Note: on the y-axis scale, the block coordinates are rendered above
the line, instead of under the node coordinate, as that makes
them adjacent to the block they refer to.
for illustration: create a map with --drawscale --tiles=16 --tileorigin=world.
this makes the tiles correspond to the map blocks.
Consider a point with y-coordinate 64. It is part of a map-block with y=64..79.
This block is located at and above the line corresponding to y=64. On the y-axis,
it is therefore most intuitive to render the block coordinate above the line.
This new mode averages the colors of all transparent blocks, instead of
making the colors progressively darker and more opaque.
This 'average' mode is now the default when using --drawalpha. It can be
explicitly selected using --drawalpha=average. The old modes can be selected
using --drawalpha=cumulative[-darken].
It is recommended to change the colors of water as well. These are in a
separate patch.
As this comes with a significant performance penalty, this
feature must be enabled using the command-line option --drawair
For best results, the color of air should be fully transparent,
so that underlying nodes will override it.
This is useful to show invisible ('air' or 'invalid') nodes in blocks
that are in the database using a different color than blocks that are
not in the database (which will have no color at all, causing the
background color to show).
A colors file can now specify other colors files, from which
additional node color specifications will be read. This allows, for
instance, using system-installed colors file for most colors,
and only overriding some of its colors in a custom colors file.
As a purpose of using a custom colors file may be to leave the colors
for some nodes undefined, it is now also possible to undefine a
previously defined node color (i.e. after reading another colors file
which defines a color for the node).
Supported figures are points, lines, ellipses, rectangles
and text.
The figures' locations can be specified using either world
coordinates, or map coordinates.
In preparation for future changes.
New geometry and new coordinate syntax has been added as well:
Additional node coordinate formats:
<block>#[<node>]
<block>.[<node>]
Additional geometry formats:
<x1>,<y1>:<x2>,<y2>
<x>,<y>:<w>x<h>
Also: the old geometry behavior (block granularity and map shrinking)
is now enabled only if the old geometry format is used (for compatibility)
(empty map blocks are blocks that have no associated block data
in the database (which should probably not happen), or that are
not in the database at all, but that are still queried for some
reason (which is unlikely))
When requesting, for instance, a 75x85 map, the mapper will
now create a 75x85 map, instead of an 80x96 (or even 96x108)
map as it did before.
This new behavior is the default when using one of the options
--centergeometry or --cornergeometry.
In addition, both of these options will no longer shrink the
map, to remove rows or columns of empty blocks at the edges.
Previously, this behavior was enabled with --forcegeometry.
An option --geometrymode has been added as well, to tune
the interpretation of the geometry. It supports 4 flags:
- pixel: the requested geometry is interpreted with pixel
granularity. The map is not enlarged to include
entire map blocks.
- block: the requested geometry is interpreted with block
granularity. The map is enlarged with at most 15
nodes at each of the four edges, so that it
includes entire map blocks only.
- fixed: a map of the requested geometry is created (after
adjustmens for 'block' mode). Empty rows or
columns at the edges are not removed.
- shrink: Empty rows and columns at the map edges are
removed to generate the smallest picture possible.
Lastly, a new geometry syntax has been added, which is more
compatible with known syntax (i.e. X-Windows), and which
allows the offset to be optional. If the offset is omitted,
the picture defaults to be centered around 0,0.
`<width>x<height>[+|-<xoffset>+|-<yoffset>]`
For compatibility, the behavior of the option --geometry
was not changed. If (and only if) used before --geometrymode,
it enables block granularity and shrink.
The old option --forcegeometry is no longer documented,
but still recognised for compatibility.
Color mixing using alpha channel now spans map blocks.
So for instance, water is partly translucent to great depths.
Water (or other translucent material) now also becomes darker
with depth.
This is necessary, because libgd may fail, or print some
unintelligible message when these limits are reached.
Known limitations:
- libgd refuses to create images larger than approx INT_MAX (2^31-1)
pixels (a little over 46300x46300), even on 64-bit systems.
- on a 32-bit system, in practise, the largest size that can be
generated is a little over 24100x24100 pixels.