.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


###########
RedlineItem
###########

.. js:class:: wv.Markup.Redline.RedlineItem

   Base class for Redline Markup. It should not be used directly.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.Markup.Redline.RedlineItem.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wv.Markup.Redline.RedlineItem.uniqueId`
   * :js:data:`~wv.Markup.Redline.RedlineItem._viewer`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.Markup.Redline.RedlineItem.draw`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.getClassName`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.hit`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.hitWithTolerance`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.onDeselect`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.onDragEnd`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.onDragMove`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.onDragStart`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.onSelect`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.remove`
   * :js:meth:`~wv.Markup.Redline.RedlineItem.toJson`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wv.Markup.Redline.RedlineItem.constructor

      .. rst-class:: sig-pretty-signature
      
         | RedlineItem(**viewer**\ : :js:class:`IWebViewer <wv.IWebViewer>`\ ): :js:class:`RedlineItem <wv.Markup.Redline.RedlineItem>`
      
      **Parameters**
      
      
         **viewer**\ : :js:class:`IWebViewer <wv.IWebViewer>`
      
      
      **Returns**\ : :js:class:`RedlineItem <wv.Markup.Redline.RedlineItem>`
      



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: wv.Markup.Redline.RedlineItem.uniqueId

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | uniqueId: *string*
      



.. js:data:: wv.Markup.Redline.RedlineItem._viewer

      .. rst-class:: sig-pretty-signature
      
         | _viewer: :js:class:`IWebViewer <wv.IWebViewer>`
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wv.Markup.Redline.RedlineItem.draw

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | draw(**_renderer**\ : :js:class:`MarkupRenderer <wv.Markup.MarkupRenderer>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ ): *void*
      
      Called when the markup item should be redrawn on a specific view. This most typically happens when the scene is rendered.
      
      **Parameters**
      
      
         **_renderer**\ : :js:class:`MarkupRenderer <wv.Markup.MarkupRenderer>`
      
      
            renderer engine to draw.
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the view to draw on.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Redline.RedlineItem.getClassName

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getClassName(): *string*
      
      Gets the fully qualified class name for this markup item. E.g. "Communicator.Markup.Redline.RedlineCircle"
      
      **Returns**\ : *string*
      
      
         fully qualified class name
      
      



.. js:method:: wv.Markup.Redline.RedlineItem.hit

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | hit(**_point**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ ): *boolean*
      
      Called when a hit test is performed on this markup item.
      
      **Parameters**
      
      
         **_point**\ : :js:class:`Point2 <wv.Point2>`
      
      
            position in window where the hit test is being performed.
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the projection where the hit test occurred.
      
      
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether this item was picked
      
      



.. js:method:: wv.Markup.Redline.RedlineItem.hitWithTolerance

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | hitWithTolerance(**_point**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ , **_pickTolerance**\ : *number*\ ): *boolean*
      
      Called when a hit test is performed on this markup item.
      
      **Parameters**
      
      
         **_point**\ : :js:class:`Point2 <wv.Point2>`
      
      
            position in window where the hit test is being performed.
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the projection where the hit test occurred.
      
      
         **_pickTolerance**\ : *number*
      
      
            amount of tolerance allowed for a hit in pixels.
      
      
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether this item was picked
      
      



.. js:method:: wv.Markup.Redline.RedlineItem.onDeselect

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | onDeselect(): *void*
      
      Called when this markup item is deselected by the system
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Redline.RedlineItem.onDragEnd

      .. rst-class:: sig-pretty-signature
      
         | onDragEnd(**_position**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ ): *boolean*
      
      **Parameters**
      
      
         **_position**\ : :js:class:`Point2 <wv.Point2>`
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.Markup.Redline.RedlineItem.onDragMove

      .. rst-class:: sig-pretty-signature
      
         | onDragMove(**_position**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ ): *boolean*
      
      **Parameters**
      
      
         **_position**\ : :js:class:`Point2 <wv.Point2>`
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.Markup.Redline.RedlineItem.onDragStart

      .. rst-class:: sig-pretty-signature
      
         | onDragStart(**_position**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ ): *boolean*
      
      **Parameters**
      
      
         **_position**\ : :js:class:`Point2 <wv.Point2>`
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.Markup.Redline.RedlineItem.onSelect

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | onSelect(**_view**\ : :js:class:`IView <wv.IView>`\ ): *void*
      
      Called when this markup item is selected by the system from a given view.
      
      **Parameters**
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the view where the selection occurred
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Redline.RedlineItem.remove

      .. rst-class:: sig-pretty-signature
      
         | remove(**_view**\ : (*None* | :js:class:`IView <wv.IView>`\ )): *void*
      
      Called when the MarkupItem is removed from a view from the system. Any cleanup that needs to be done should be performed in this method.
      
      **Parameters**
      
      
         **_view**\ : (*None* \| :js:class:`IView <wv.IView>`\ )
      
      
            the view to remove from, null if removed from everywhere.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Redline.RedlineItem.toJson

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | toJson(): *object*
      
      Creates an object ready for JSON serialization.
      
      **Returns**\ : *object*
      
      
         The prepared object.
      
      




