eurostat-map
    Preparing search index...

    Interface StampConfig

    Configuration for a stamp/watermark annotation rendered on the map.

    map.stamp({ x: 230, y: 100, text: 'DRAFT', shape: 'circle', size: 60 })
    
    interface StampConfig {
        text: string;
        x?: number;
        y?: number;
        shape?: "circle" | "square" | "rectangle" | "eu-stars";
        size?: number;
        fontSize?: number;
        textColor?: string;
        stampColor?: string;
        strokeWidth?: number;
        lineHeight?: number;
        textAnchor?: "middle" | "start";
        padding?: number;
        rx?: number;
        starSize?: number;
    }
    Index

    Properties

    text: string

    Text content of the stamp. Use ¶ for forced line breaks, ~ for non-breaking spaces.

    x?: number

    Horizontal centre position in SVG pixels.

    230
    
    y?: number

    Vertical centre position in SVG pixels.

    100
    
    shape?: "circle" | "square" | "rectangle" | "eu-stars"

    Shape of the stamp border.

    'circle'
    
    size?: number

    Size of the stamp in SVG pixels. For circle/square: diameter. For rectangle: controls text fit height. Ignored when fontSize is set.

    60
    
    fontSize?: number

    Fix the rendered font size in pixels and let the shape grow to contain the text, instead of scaling text to fit a fixed shape size.

    textColor?: string

    Text colour.

    '#585858'
    
    stampColor?: string

    Border/shape colour.

    '#9e9e9e'
    
    strokeWidth?: number

    Border stroke width in pixels.

    1
    
    lineHeight?: number

    Line height of the unscaled text element in pixels.

    15
    
    textAnchor?: "middle" | "start"

    Text horizontal alignment. 'middle': stamp is centred on x (default). 'start': stamp's left edge is at x, growing rightward.

    'middle'
    
    padding?: number

    Padding between the text and the shape border in pixels.

    0 for circle/square/eu-stars, 1 for rectangle
    
    rx?: number

    Corner radius for square and rectangle shapes (SVG rx attribute).

    0
    
    starSize?: number

    Size multiplier for individual stars in the 'eu-stars' shape. Does not affect the ring radius.

    1