Commit Graph

8 Commits (efa067ab79ae2816d41e45fc00bf918af1da68db)

Author SHA1 Message Date
Rogier 6a26a8ef4b Make the geometry pixel-accurate instead of map-block accurate
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.
2014-04-16 15:12:37 +02:00
Rogier 2119a6ae75 Make PixelAttributes more generic
In preparation for other changes
2014-04-16 10:55:58 +02:00
Rogier ce94029c95 Merge PixelCacheEntry into PixelAttributes 2014-04-14 01:29:58 +02:00
Sfan5 e96c23a8f7 Add alpha transparency ability for blocks 2014-04-09 11:03:54 +02:00
Miroslav Bendík f0e064744b Small refactoring. 2012-09-01 16:17:58 +02:00
Miroslav Bendík 4a8c041bc1 Small optimization of PixelAttributes. 2012-09-01 14:36:14 +02:00
Miroslav Bendík 5be190b5a1 Removed bad shadows. 2012-08-25 13:27:40 +02:00
Miroslav Bendík 1aee368837 Implemented shading. 2012-08-25 13:21:28 +02:00