SVGMarkupRenderer
- class Markup.Svg.SVGMarkupRenderer()
This class provides an interface for MarkupItems to draw on the canvas.
Constructors
Methods
Constructors
- SVGMarkupRenderer.constructor()
- Return type
SVGMarkupRenderer
Methods
drawCircle
- SVGMarkupRenderer.drawCircle(circle)
- Arguments
circle (
Circle()) – the circle to draw.
Renders a circle to the markup layer.
- Returns
SVG element for the circle. This element is temporary and will not be preserved when the markup is redrawn.
- Return type
Element
drawCircles
- SVGMarkupRenderer.drawCircles(circleCollection)
- Arguments
circleCollection (
CircleCollection()) – None
Renders a collection of circles sharing the same properties to the markup layer.
- Returns
an array containing SVG elements for each circle. These elements are temporary and will not be preserved when the markup is redrawn.
- Return type
[Element]
drawLine
- SVGMarkupRenderer.drawLine(line)
- Arguments
line (
Line()) – the line to render.
Renders a line to the markup layer.
- Returns
SVG element for the line. This element is temporary and will not be preserved when the markup is redrawn.
- Return type
SVGLineElement
drawLines
- SVGMarkupRenderer.drawLines(lineCollection)
- Arguments
lineCollection (
LineCollection()) – None
Renders a collection of lines sharing the same properties to the markup layer.
- Returns
an array containing SVG elements for each line. These elements are temporary and will not be preserved when the markup is redrawn.
- Return type
[Element]
drawPolygon
- SVGMarkupRenderer.drawPolygon(polygon)
- Arguments
polygon (
Polygon()) – the polygon to render.
Renders a polygon to the markup layer.
- Returns
SVG element for the polygon. This element is temporary and will not be preserved when the markup is redrawn.
- Return type
Element
drawPolygons
- SVGMarkupRenderer.drawPolygons(polygonCollection)
- Arguments
polygonCollection (
PolygonCollection()) – None
Renders a collection of polygons sharing the same properties to the markup layer.
- Returns
an array containing SVG elements for each polygon. These elements are temporary and will not be preserved when the markup is redrawn.
- Return type
[Element]
drawPolyline
- SVGMarkupRenderer.drawPolyline(line)
- Arguments
line (
Polyline()) – the polyline to draw.
Renders a polyline to the markup layer.
- Returns
SVG element for the line. This element is temporary and will not be preserved when the markup is redrawn.
- Return type
SVGPolylineElement
drawPolylines
- SVGMarkupRenderer.drawPolylines(polylineCollection)
- Arguments
polylineCollection (
PolylineCollection()) – None
Renders a collection of polylines sharing the same properties to the markup layer.
- Returns
an array containing SVG elements for each line. These elements are temporary and will not be preserved when the markup is redrawn.
- Return type
[Element]
drawRectangle
- SVGMarkupRenderer.drawRectangle(rectangle)
- Arguments
rectangle (
Rectangle()) – the rectangle to render.
Renders a rectangle to the markup layer.
- Returns
SVG element for the rectangle. This element is temporary and will not be preserved when the markup is redrawn.
- Return type
Element
drawRectangles
- SVGMarkupRenderer.drawRectangles(rectangleCollection)
- Arguments
rectangleCollection (
RectangleCollection()) – None
Renders a collection of rectangles sharing the same properties to the markup layer.
- Returns
an array containing SVG elements for each rectangle. These elements are temporary and will not be preserved when the markup is redrawn.
- Return type
[Element]
drawText
- SVGMarkupRenderer.drawText(text)
- Arguments
text (
Text()) – the text to render.
Renders text to the markup layer.
- Returns
SVG element for the text. This element is temporary and will not be preserved when the markup is redrawn.
- Return type
SVGTextContentElement
drawTextBox
- SVGMarkupRenderer.drawTextBox(textBox)
- Arguments
textBox (
TextBox()) – the text box to render.
Renders a text box to the markup layer.
- Returns
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.
- Return type
[Element]
drawTextBoxes
- SVGMarkupRenderer.drawTextBoxes(textBoxes)
- Arguments
textBoxes (
TextBoxCollection()) – the collection of text boxes to render.
Renders a collection of text boxes sharing the same properties to the markup layer.
- Returns
an array containing SVG element pairs for each text box. These elements are temporary and will not be preserved when the markup is redrawn.
- Return type
[[Element]]
drawTexts
- SVGMarkupRenderer.drawTexts(texts)
- Arguments
texts (
TextCollection()) – the collection of texts to render.
Renders a collection of text sharing the same properties to the markup layer.
- Returns
an array containing SVG elements for each text. These elements are temporary and will not be preserved when the markup is redrawn.
- Return type
[Element]
measureText
- SVGMarkupRenderer.measureText(str, text)
- Arguments
str (
string()) – the text string to measure.text (
TextMarkupBase()) – None
Computes the width and height of a string using the given text attributes.
- Returns
a point object containing the width and height in pixels of the string.
- Return type
Point2
measureTextBox
- SVGMarkupRenderer.measureTextBox(textBox)
- Arguments
textBox (
TextBox()) – the text box to measure.
Computes the width and height of a text box.
- Returns
a point object containing the width and height in pixels of the text box.
- Return type
Point2