Skip to main content

drawing

Index

Functions

draw

  • draw(element: HTMLDivElement, fn: (svgDrawingElement: any) => any): void
  • Parameters

    • element: HTMLDivElement
    • fn: (svgDrawingElement: any) => any

    Returns void

drawArrow

drawCircle

  • drawCircle(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, circleUID: string, center: Point2, radius: number, options?: {}): void
  • Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • circleUID: string
    • center: Point2
    • radius: number
    • options: {} = {}

    Returns void

drawEllipse

  • drawEllipse(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, ellipseUID: string, corner1: Point2, corner2: Point2, options?: {}): void
  • Parameters

    Returns void

drawHandles

  • drawHandles(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, handleGroupUID: string, handlePoints: Point2[], options?: {}): void
  • Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • handleGroupUID: string
    • handlePoints: Point2[]
    • options: {} = {}

    Returns void

drawLine

drawLinkedTextBox

  • drawLinkedTextBox(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, textBoxUID: string, textLines: string[], textBoxPosition: Point2, annotationAnchorPoints: Point2[], textBox: unknown, options?: {}): SVGRect
  • Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • textBoxUID: string
    • textLines: string[]
    • textBoxPosition: Point2
    • annotationAnchorPoints: Point2[]
    • textBox: unknown
    • options: {} = {}

    Returns SVGRect

drawPolyline

  • drawPolyline(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, polylineUID: string, points: Point2[], options: { color?: string; connectLastToFirst?: boolean; lineDash?: string; lineWidth?: number; width?: number }): void
  • Draws an SVG polyline with the given points.

    The connectLastToFirst option, if true, draws a closed polyline, with the last point connected to the first.


    Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • polylineUID: string
    • points: Point2[]
    • options: { color?: string; connectLastToFirst?: boolean; lineDash?: string; lineWidth?: number; width?: number }

    Returns void

drawRect

drawTextBox

  • drawTextBox(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, textUID: string, textLines: string[], position: Point2, options?: {}): SVGRect
  • Draws a textBox.


    Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • textUID: string
    • textLines: string[]

      The text to display.

    • position: Point2

      The x/y position of the textbox

    • options: {} = {}

      Options for the textBox.

    Returns SVGRect

    Bounding box; can be used for isPointNearTool