Hypfer / ICantBelieveItsNotValetudo

A Valetudo companion service which renders maps to pngs
Apache License 2.0
129 stars 80 forks source link

add cropping the map #8

Closed alexkn closed 5 years ago

alexkn commented 5 years ago

Add settings to crop the map to certain bounds. The values ​​refer to the pixel values ​​in the mapdata and not to zone coordinates. If the settings ​​are not specified, the whole map will be rendered as before.

config.json:

 "mapSettings": {
      "drawPath": true,
      "drawCharger": true,
      "drawRobot": true,
      "border": 1,
      "scale": 4,
      "crop_x1": 100,
      "crop_x2": 240,
      "crop_y1": 90,
      "crop_y2": 365
    },

see #7, thanks to @noxhirsch

manutenfruits commented 5 years ago

@Hypfer I would love to get this merged, is there anything else needed?