SVGMarkupRenderer
-
class
Markup.Svg.SVGMarkupRenderer() This class provides an interface for MarkupItems to draw on the canvas.
Constructors
-
Markup.Svg.SVGMarkupRenderer.constructor() - SVGMarkupRenderer():
SVGMarkupRendererReturns:
SVGMarkupRenderer
Methods
-
Markup.Svg.SVGMarkupRenderer.drawCircle() - drawCircle(circle:
Circle): ElementRenders a circle to the markup layer.
Parameters
circle:
Circlethe 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:CircleCollectionReturns: 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): SVGLineElementRenders a line to the markup layer.
Parameters
line:
Linethe 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:LineCollectionReturns: 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): ElementRenders a polygon to the markup layer.
Parameters
polygon:
Polygonthe 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:PolygonCollectionReturns: 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): SVGPolylineElementRenders a polyline to the markup layer.
Parameters
line:
Polylinethe 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:PolylineCollectionReturns: 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): ElementRenders a rectangle to the markup layer.
Parameters
rectangle:
Rectanglethe 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:RectangleCollectionReturns: 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): SVGTextContentElementRenders text to the markup layer.
Parameters
text:
Textthe 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:
TextBoxthe 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:
TextBoxCollectionthe 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:
TextCollectionthe 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):Point2Computes the width and height of a string using the given text attributes.
Parameters
Returns:
Point2a point object containing the width and height in pixels of the string.