Communicator.Markup.MarkupRenderer

 MarkupRenderer

This class provides an interface for MarkupItems to draw on the canvas.

Methods

drawCircle

  • drawCircle(circle: Circle): Element
  • Renders a circle to the markup layer.

    Parameters

    • circle: Circle

      the circle to draw.

    Returns Element

    SVG element for the circle. This element is temporary and will not be preserved when the markup is redrawn.

drawCircles

  • Renders a collection of circles sharing the same properties to the markup layer.

    Parameters

    Returns Element[]

    an array containing SVG elements for each circle. These elements are temporary and will not be preserved when the markup is redrawn.

drawLine

  • drawLine(line: Line): Element
  • Renders a line to the markup layer.

    Parameters

    • line: Line

      the line to render.

    Returns Element

    SVG element for the line. This element is temporary and will not be preserved when the markup is redrawn.

drawLines

  • Renders a collection of lines sharing the same properties to the markup layer.

    Parameters

    Returns Element[]

    an array containing SVG elements for each line. These elements are temporary and will not be preserved when the markup is redrawn.

drawPolygon

  • drawPolygon(polygon: Polygon): Element
  • Renders a polygon to the markup layer.

    Parameters

    • polygon: Polygon

      the polygon to render.

    Returns Element

    SVG element for the polygon. This element is temporary and will not be preserved when the markup is redrawn.

drawPolygons

  • Renders a collection of polygons sharing the same properties to the markup layer.

    Parameters

    Returns Element[]

    an array containing SVG elements for each polygon. These elements are temporary and will not be preserved when the markup is redrawn.

drawPolyline

  • drawPolyline(polyline: Polyline): Element
  • Renders a polyline to the markup layer.

    Parameters

    Returns Element

    SVG element for the line. This element is temporary and will not be preserved when the markup is redrawn.

drawPolylines

  • Renders a collection of polylines sharing the same properties to the markup layer.

    Parameters

    Returns Element[]

    an array containing SVG elements for each line. These elements are temporary and will not be preserved when the markup is redrawn.

drawRectangle

  • drawRectangle(rectangle: Rectangle): Element
  • Renders a rectangle to the markup layer.

    Parameters

    • rectangle: Rectangle

      the rectangle to render.

    Returns Element

    SVG element for the rectangle. This element is temporary and will not be preserved when the markup is redrawn.

drawRectangles

  • Renders a collection of rectangles sharing the same properties to the markup layer.

    Parameters

    Returns Element[]

    an array containing SVG elements for each rectangle. These elements are temporary and will not be preserved when the markup is redrawn.

drawText

  • drawText(text: Text): Element
  • Renders text to the markup layer.

    Parameters

    • text: Text

      the text to render.

    Returns Element

    SVG element for the text. This element is temporary and will not be preserved when the markup is redrawn.

drawTextBox

  • drawTextBox(textBox: TextBox): Element[]
  • Renders a text box to the markup layer.

    Parameters

    • textBox: TextBox

      the text box to render.

    Returns Element[]

    SVG element pair for the text. The first item in this array corresponds to the rectangle. The second item corresponds to the text. These elements are temporary and will not be preserved when the markup is redrawn.

drawTextBoxes

  • Renders a collection of text boxes sharing the same properties to the markup layer.

    Parameters

    Returns Element[][]

    an array containing SVG element pairs for each text box. These elements are temporary and will not be preserved when the markup is redrawn.

drawTexts

  • Renders a collection of text sharing the same properties to the markup layer.

    Parameters

    Returns Element[]

    an array containing SVG elements for each text. These elements are temporary and will not be preserved when the markup is redrawn.

measureText

  • Computes the width and height of a string using the given text attributes.

    Parameters

    Returns Point2

    a point object containing the width and height in pixels of the string.

measureTextBox

  • Computes the width and height of a text box.

    Parameters

    • textBox: TextBox

      the text box to measure.

    Returns Point2

    a point object containing the width and height in pixels of the text box.