@inweb/viewer-visualize
    Preparing search index...

    Interface IMarkupLine

    2D markup Line object interface.

    interface IMarkupLine {
        addPoints(points: [{ x: number; y: number }]): any;
        delete(): void;
        enableMouseEditing(value: boolean): void;
        getColor(): string;
        getLineType(): string;
        getLineWidth(): number;
        getPoints(): number[];
        getRotation(): number;
        getZIndex(): number;
        id(): string;
        ref(): any;
        setColor(hex: string): void;
        setLineType(type: string): any;
        setLineWidth(size: number): any;
        setRotation(degrees: number): void;
        setZIndex(zIndex: number): void;
        type(): string;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Adds the specified points to the end of the line.

      Parameters

      • points: [{ x: number; y: number }]

        Array of 2D points.

      Returns any

    • Enables or disables the ability to select and edit an object using the mouse.

      Parameters

      • value: boolean

      Returns void

    • Returns the foreground color of an object's line or text as a string in hexadecimal color syntax #RGB using its primary color components (red, green, blue) written as hexadecimal numbers.

      Returns string

    • Returns the line type. Can be solid, dot or dash.

      Returns string

    • Returns the line width.

      Returns number

    • Returns the coordinates of the line points as a flat array [x1, y1, x2, y2, ...].

      Returns number[]

    • Returns the rotation angle of the object, in degress.

      Returns number

    • Returns the Z-index of a object relative to sibling objects that are in the same group.

      Z-Index is not absolute (like in CSS). It is relative to parent object group only:

      • images - are olways at the bottom
      • texts - are olways on top
      • others - are always between images and texts

      Returns number

    • Returns the internal identifier of the object. Not unique.

      Returns string

    • Returns a reference to a core markup library object (Konva, VisualizeJS, etc.).

      Returns any

    • Sets the foreground color of an object's line or text.

      Parameters

      • hex: string

        Color in hexadecimal color syntax #RGB.

      Returns void

    • Sets the line type.

      Parameters

      • type: string

        Line type. Can be solid, dot or dash.

      Returns any

    • Sets the line width.

      Parameters

      • size: number

      Returns any

    • Sets the rotation angle of the object.

      Parameters

      • degrees: number

        Number of degress to rotate.

      Returns void

    • Sets the Z-index of a object relative to sibling objects that are in the same group.

      Z-Index is not absolute (like in CSS). It is relative to parent object group only:

      • images - are olways at the bottom
      • texts - are olways on top
      • others - are always between images and texts

      Parameters

      • zIndex: number

        An integer value of Z-Index.

      Returns void

    • Returns the type of the object.

      Returns string