@samatawy/diagrams
    Preparing search index...

    Interface ImageStyle

    interface ImageStyle {
        image_id?: string;
        mode?: ImageMode;
        padding?: number;
        align?: ImageAlign;
    }
    Index

    Properties

    image_id?: string

    The ID of the image source stored in the diagram-level image_assets dictionary.

    mode?: ImageMode

    The mode for rendering the image within the node, which can be:

    • 'contain': The image is scaled to fit within the node's area while maintaining its aspect ratio.
    • 'cover': The image is scaled to cover the node's area while maintaining its aspect ratio.
    • 'pattern': The image is repeated to fill the node's area, creating a pattern effect.
    • 'fit': The image is drawn once within the node's bounding box, without scaling.
    • 'none': The image is not rendered within the node.
    padding?: number

    The padding in pixels between the image and the node's borders, used when mode is 'contain'.

    align?: ImageAlign

    Alignment of the image within the node, used when mode is 'contain'.