MarkupRenderer
-
class
Markup.MarkupRenderer() This class provides an interface for MarkupItems to draw on the canvas.
Methods
-
Markup.MarkupRenderer.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.MarkupRenderer.drawCircles() - drawCircles(circles:
CircleCollection): Element[]Renders a collection of circles sharing the same properties to the markup layer.
Parameters
circles:
CircleCollectionthe collection of circle to render.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.MarkupRenderer.drawLine() - drawLine(line:
Line): ElementRenders a line to the markup layer.
Parameters
line:
Linethe line to render.Returns: Element
SVG element for the line. This element is temporary and will not be preserved when the markup is redrawn.
-
Markup.MarkupRenderer.drawLines() - drawLines(lines:
LineCollection): Element[]Renders a collection of lines sharing the same properties to the markup layer.
Parameters
lines:
LineCollectionthe collection of lines to render.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.MarkupRenderer.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.MarkupRenderer.drawPolygons() - drawPolygons(polygons:
PolygonCollection): Element[]Renders a collection of polygons sharing the same properties to the markup layer.
Parameters
polygons:
PolygonCollectionthe collection of polygons to render.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.MarkupRenderer.drawPolyline() - drawPolyline(polyline:
Polyline): ElementRenders a polyline to the markup layer.
Parameters
polyline:PolylineReturns: Element
SVG element for the line. This element is temporary and will not be preserved when the markup is redrawn.
-
Markup.MarkupRenderer.drawPolylines() - drawPolylines(polylines:
PolylineCollection): Element[]Renders a collection of polylines sharing the same properties to the markup layer.
Parameters
polylines: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.MarkupRenderer.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.MarkupRenderer.drawRectangles() - drawRectangles(rectangles:
RectangleCollection): Element[]Renders a collection of rectangles sharing the same properties to the markup layer.
Parameters
rectangles:
RectangleCollectionthe collection of rectangles to render.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.MarkupRenderer.drawText() - drawText(text:
Text): ElementRenders text to the markup layer.
Parameters
text:
Textthe text to render.Returns: Element
SVG element for the text. This element is temporary and will not be preserved when the markup is redrawn.
-
Markup.MarkupRenderer.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.MarkupRenderer.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.MarkupRenderer.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.MarkupRenderer.measureText() - measureText(str: string, markup:
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.