Overlays - Unarekin/FoundryVTT-MicroMap GitHub Wiki

An overlay is an image that is overlayed on top of the actual map image.

Overlay Sizing

The overlay is automatically sized to the same dimensions as the minimap itself, using a method known as 9-slice scaling.

This method involves splitting the image into a 3x3 grid -- 9 slices. When the image is resized, it follows a few rules:

  • The 4 corners are not changed
  • The top- and bottom- middle slices are stretched horizontally to fit the space between their respective corners
  • The left- and right-middle slices are stretched vertically to fit the space between their respective corners
  • The center slice is stretched both horizontally and vertically to fit the space between the outer slices

The 'Borders' section of the overlay configuration window allows you to specify the width of the left and right columns as well as the height of the top and bottom rows, in pixels.

The preview image on this window will display red bars to show these positions.

Examples

Original size (123x105):

image

Resized (600x300):

image

Original size (256x256):

image

Resized (600x300):

image