A layer to display a mask with a scale- and page size dependent cut-out box for printing.

Hierarchy (View Summary)

Index

Constructors

Properties

context: CanvasRenderingContext2D
size: null | [number, number] = null

Methods

  • Draws a mask with a cut-out box shape on the map canvas context.

    Parameters

    • canvasWidth: number

      The width of the canvas.

    • canvasHeight: number

      The height of the canvas.

    • box_ul: [number, number]

      The [x, y] coordinates of the upper-left corner of the cut-out box.

    • box_ur: [number, number]

      The [x, y] coordinates of the upper-right corner of the cut-out box.

    • box_lr: [number, number]

      The [x, y] coordinates of the lower-right corner of the cut-out box.

    • box_ll: [number, number]

      The [x, y] coordinates of the lower-left corner of the cut-out box.

    Returns void

  • Parameters

    • totalWidth: number
    • totalHeight: number
    • boxWidth: number
    • boxHeight: number

    Returns [[number, number], [number, number], [number, number], [number, number]]