SVGMarkupRenderer

class Markup.Svg.SVGMarkupRenderer()

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

Constructors

Markup.Svg.SVGMarkupRenderer.constructor()
SVGMarkupRenderer(): SVGMarkupRenderer

Returns: SVGMarkupRenderer

Methods

Markup.Svg.SVGMarkupRenderer.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.
Markup.Svg.SVGMarkupRenderer.drawCircles()
drawCircles(circleCollection: CircleCollection): Element[]

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

Parameters

circleCollection: CircleCollection

Returns: Element[]

an array containing SVG elements for each circle. These elements are temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.drawLine()
drawLine(line: Line): SVGLineElement

Renders a line to the markup layer.

Parameters

line: Line

the line to render.

Returns: SVGLineElement

SVG element for the line. This element is temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.drawLines()
drawLines(lineCollection: LineCollection): Element[]

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

Parameters

lineCollection: LineCollection

Returns: Element[]

an array containing SVG elements for each line. These elements are temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.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.
Markup.Svg.SVGMarkupRenderer.drawPolygons()
drawPolygons(polygonCollection: PolygonCollection): Element[]

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

Parameters

polygonCollection: PolygonCollection

Returns: Element[]

an array containing SVG elements for each polygon. These elements are temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.drawPolyline()
drawPolyline(line: Polyline): SVGPolylineElement

Renders a polyline to the markup layer.

Parameters

line: Polyline

the polyline to draw.

Returns: SVGPolylineElement

SVG element for the line. This element is temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.drawPolylines()
drawPolylines(polylineCollection: PolylineCollection): Element[]

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

Parameters

polylineCollection: PolylineCollection

Returns: Element[]

an array containing SVG elements for each line. These elements are temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.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.
Markup.Svg.SVGMarkupRenderer.drawRectangles()
drawRectangles(rectangleCollection: RectangleCollection): Element[]

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

Parameters

rectangleCollection: RectangleCollection

Returns: Element[]

an array containing SVG elements for each rectangle. These elements are temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.drawText()
drawText(text: Text): SVGTextContentElement

Renders text to the markup layer.

Parameters

text: Text

the text to render.

Returns: SVGTextContentElement

SVG element for the text. This element is temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.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.
Markup.Svg.SVGMarkupRenderer.drawTextBoxes()
drawTextBoxes(textBoxes: TextBoxCollection): Element[][]

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

Parameters

textBoxes: TextBoxCollection

the collection of text boxes to render.

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.
Markup.Svg.SVGMarkupRenderer.drawTexts()
drawTexts(texts: TextCollection): Element[]

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

Parameters

texts: TextCollection

the collection of texts to render.

Returns: Element[]

an array containing SVG elements for each text. These elements are temporary and will not be preserved when the markup is redrawn.
Markup.Svg.SVGMarkupRenderer.measureText()
measureText(str: string, text: TextMarkupBase): Point2

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

Parameters

str: string

the text string to measure.

text: TextMarkupBase

Returns: Point2

a point object containing the width and height in pixels of the string.
Markup.Svg.SVGMarkupRenderer.measureTextBox()
measureTextBox(textBox: TextBox): Point2

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.