Skip to content

Crop margin incorrectly applied(?) #90

Description

@BafDyce

Commit 291a660 introduced a margin to the crop feature. However, I *think* that the margin is incorrectly applied, thus making the actually rendered area smaller. I am referring to the following lines:

class CroppedRegionSet(RegionSetWrapper):
MARGIN = 5
def __init__(self, rsetobj, xmin, zmin, xmax, zmax):
super(CroppedRegionSet, self).__init__(rsetobj)
self.xmin = (xmin // 16) + self.MARGIN
self.xmax = (xmax // 16) - self.MARGIN
self.zmin = (zmin // 16) + self.MARGIN
self.zmax = (zmax // 16) - self.MARGIN

The margin is added to the *min values and subtracted from the *max values.

On our map, we are using the crop feature to get detailed renderers of several locations. All of these are now cut off at the borders because Overviewer removes 5 chunks at each side.

For example, for one location we have specified the following: "crop": (830, 50, 1250, 500) (= 420x450) but Overviewer actually only renders the following area: (896, 128, 1183, 431) (= 287x303)

Or am I understanding the margin wrong and it is actually intended to make the rendered area smaller? Then, it should be documented ;)
Also, it would be great if the margin could also be controlled via the config in case someone wants an exact render.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions