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

    Interface IMarkupText

    2D markup Text object interface.

    interface IMarkupText {
        delete(): void;
        enableMouseEditing(value: boolean): void;
        getColor(): string;
        getFontSize(): number;
        getPosition(): { x: number; y: number };
        getRotation(): number;
        getText(): string;
        getZIndex(): number;
        id(): string;
        ref(): any;
        setColor(hex: string): void;
        setFontSize(size: number): void;
        setPosition(x: number, y: number): void;
        setRotation(degrees: number): void;
        setText(text: string): void;
        setZIndex(zIndex: number): void;
        type(): string;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • 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 font size of the text.

      Returns number

    • Returns the coordinates of the top-left point (position) of the text.

      Returns { x: number; y: number }

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

      Returns number

    • Returns the text string.

      Returns string

    • 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 font size of the text.

      Parameters

      • size: number

      Returns void

    • Sets the coordinates of the top-left point (position) of the text.

      Parameters

      • x: number
      • y: number

      Returns void

    • Sets the rotation angle of the object.

      Parameters

      • degrees: number

        Number of degress to rotate.

      Returns void

    • Sets the text string.

      Parameters

      • text: string

      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