Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new parameter
ratioto allow drawing rectangular maps.The ratio part is pretty straightforward, it just updates the perimeter boundary creation to use the introduced
ratioparameter.However, some other parts of the code were written under the assumption that the ratio is 1, these parts needed to be updated as well. The background generation now uses
padanddilate:padscales the perimeter boundary of a certain amount to generate the background.dilateadd a certain amount to the perimeter boundary to generate the background.In case of a ratio different of 1, using only
pad, the margin added to the background are not homogeneous between vertical and horizontal sides. Whereasdilateadds the same amount of margin on all sides.The default value for
padis set at 1 in the code, but at 1.1 in the presets, to keep the existing behavior.This PR also reintroduces the
dilateparameter in the layers to allow printing some layers outside of others. In the example above, streets and water layers have adilatevalue of 100.