PiDraw API
    Preparing search index...

    Interface ILabelConfig

    How a label is drawn, whatever the figure it belongs to.

    interface ILabelConfig {
        alignement: LABEL_POSITION;
        asHtml: boolean;
        away: XY | null;
        clearance: number;
        offset: XY;
        push: number | null;
        rotate: number;
        size: string;
        texConverter?: (value: string) => string;
    }
    Index
    alignement: LABEL_POSITION

    On which side of its anchor the label lies: tl above and to the left, br below and to the right, mc centered on it.

    asHtml: boolean

    The label is HTML (a foreignObject), for the text of a texConverter.

    away: XY | null

    A direction on the screen (the y axis points down) that replaces the alignement: the label lies on that side of its anchor, whatever the angle (the side of the box that faces the anchor is touched by it). null when the alignement decides.

    clearance: number

    The push of a label that was asked none, in pixels: a figure that holds something over its label (a drag handle) keeps it clear.

    offset: XY

    Added to the place of the label, in pixels, with the y axis pointing up.

    push: number | null

    How far the label is pushed from its anchor, in pixels, further in the direction where it lies (away, or the one of its alignement). null when none was asked: it is then the clearance.

    rotate: number

    The rotation of the label around its anchor, in degrees clockwise on the screen.

    size: string

    The font size, as in CSS.

    texConverter?: (value: string) => string

    Turns the text of an HTML label into HTML (the LaTeX of a label, rendered). Without it the text of an HTML label is written as it is, never read as HTML.