.. role:: ts-api-decorator

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

.. js:module:: Markup.Redline
   :noindex:

.. container:: ts-api-section

   .. js:class:: RedlineItem

      Base class for Redline Markup. It should not be used directly.



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~Markup.Redline.RedlineItem.constructor`



.. container:: api-index-section

   .. rubric:: Properties

   .. rst-class:: api-index-list-item api-kind-property api-parent-kind-class

   * :js:attr:`~Markup.Redline.RedlineItem._viewer`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~Markup.Redline.RedlineItem.draw`
   * :js:meth:`~Markup.Redline.RedlineItem.getClassName`
   * :js:meth:`~Markup.Redline.RedlineItem.hit`
   * :js:meth:`~Markup.Redline.RedlineItem.hitWithTolerance`
   * :js:meth:`~Markup.Redline.RedlineItem.onDeselect`
   * :js:meth:`~Markup.Redline.RedlineItem.onDragEnd`
   * :js:meth:`~Markup.Redline.RedlineItem.onDragMove`
   * :js:meth:`~Markup.Redline.RedlineItem.onDragStart`
   * :js:meth:`~Markup.Redline.RedlineItem.onSelect`
   * :js:meth:`~Markup.Redline.RedlineItem.remove`
   * :js:meth:`~Markup.Redline.RedlineItem.toJson`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: RedlineItem.constructor( viewer)

      :param viewer: None
      :type viewer: WebViewer


      :rtype: RedlineItem



Properties
==========

.. container:: ts-api-section

   .. js:attribute:: RedlineItem._viewer

      :type: WebViewer





Methods
=======

.. rst-class:: ts-api-section

draw
----

.. js:method:: RedlineItem.draw( _renderer, _view)

   :param _renderer: None
   :type _renderer: MarkupRenderer
   :param _view: None
   :type _view: View


   Called when the markup item should be redrawn on a specific view. This most typically happens when the scene is rendered.


   :rtype: void

.. rst-class:: ts-api-section

getClassName
------------

.. js:method:: RedlineItem.getClassName()



   Gets the fully qualified class name for this markup item. E.g. "Communicator.Markup.Redline.RedlineCircle"

   :returns: fully qualified class name


   :rtype: string

.. rst-class:: ts-api-section

hit
---

.. js:method:: RedlineItem.hit( _point, _view)

   :param _point: None
   :type _point: Point2
   :param _view: None
   :type _view: View


   Called when a hit test is performed on this markup item.

   :returns: boolean value indicating whether this item was picked


   :rtype: boolean

.. rst-class:: ts-api-section

hitWithTolerance
----------------

.. js:method:: RedlineItem.hitWithTolerance( _point, _view, _pickTolerance)

   :param _point: None
   :type _point: Point2
   :param _view: None
   :type _view: View
   :param _pickTolerance: None
   :type _pickTolerance: number


   Called when a hit test is performed on this markup item.

   :returns: boolean value indicating whether this item was picked


   :rtype: boolean

.. rst-class:: ts-api-section

onDeselect
----------

.. js:method:: RedlineItem.onDeselect()



   Called when this markup item is deselected by the system


   :rtype: void

.. rst-class:: ts-api-section

onDragEnd
---------

.. js:method:: RedlineItem.onDragEnd( _position, _view)

   :param _position: None
   :type _position: Point2
   :param _view: None
   :type _view: View


   :rtype: boolean

.. rst-class:: ts-api-section

onDragMove
----------

.. js:method:: RedlineItem.onDragMove( _position, _view)

   :param _position: None
   :type _position: Point2
   :param _view: None
   :type _view: View


   :rtype: boolean

.. rst-class:: ts-api-section

onDragStart
-----------

.. js:method:: RedlineItem.onDragStart( _position, _view)

   :param _position: None
   :type _position: Point2
   :param _view: None
   :type _view: View


   :rtype: boolean

.. rst-class:: ts-api-section

onSelect
--------

.. js:method:: RedlineItem.onSelect()



   Called when this markup item is selected by the system.


   :rtype: void

.. rst-class:: ts-api-section

remove
------

.. js:method:: RedlineItem.remove()



   Called when the MarkupItem is removed from the system.
   Any cleanup that needs to be done should be performed in this method.


   :rtype: void

.. rst-class:: ts-api-section

toJson
------

.. js:method:: RedlineItem.toJson()



   Creates an object ready for JSON serialization.

   :returns: The prepared object.


   :rtype: object

