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

  • drawArrow(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, arrowUID: string, start: Point2, end: Point2, options?: {}): void
  • Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • arrowUID: string
    • start: Point2
    • end: Point2
    • options: {} = {}

    Returns void

drawCircle

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

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

    Returns void

drawEllipse

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

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • ellipseUID: string
    • corner1: Point2
    • corner2: Point2
    • options: {} = {}
    • dataId: string = ''

    Returns void

drawEllipseByCoordinates

  • drawEllipseByCoordinates(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, ellipseUID: string, canvasCoordinates: [Point2, Point2, Point2, Point2], options?: {}, dataId?: string): void
  • Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • ellipseUID: string
    • canvasCoordinates: [Point2, Point2, Point2, Point2]
    • options: {} = {}
    • dataId: string = ''

    Returns void

drawHandle

  • drawHandle(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, handleGroupUID: string, handle: Point2, options?: {}, uniqueIndex: any): void
  • Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • handleGroupUID: string
    • handle: Point2
    • options: {} = {}
    • uniqueIndex: any

    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

  • drawLine(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, lineUID: string, start: Point2, end: Point2, options?: {}, dataId?: string): void
  • Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • lineUID: string
    • start: Point2
    • end: Point2
    • options: {} = {}
    • dataId: string = ''

    Returns void

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

drawPath

  • drawPath(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, pathUID: string, points: Point2[] | Point2[][], options: { closePath?: boolean; color?: string; fillColor?: string; fillOpacity?: number; lineDash?: string; lineWidth?: number; width?: number }): void
  • Draws an SVG path with the given points.

    The closePath option, if true, draws a closed path (last point connected to the first).


    Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • pathUID: string
    • points: Point2[] | Point2[][]
    • options: { closePath?: boolean; color?: string; fillColor?: string; fillOpacity?: number; lineDash?: string; lineWidth?: number; width?: number }

    Returns void

drawPolyline

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

    The closePath 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: { closePath?: boolean; color?: string; fillColor?: string; fillOpacity?: number; lineDash?: string; lineWidth?: number; width?: number }

    Returns void

drawRect

  • drawRect(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, rectangleUID: string, start: Point2, end: Point2, options?: {}, dataId?: string): void
  • Parameters

    • svgDrawingHelper: SVGDrawingHelper
    • annotationUID: string
    • rectangleUID: string
    • start: Point2
    • end: Point2
    • options: {} = {}
    • dataId: string = ''

    Returns void

drawRedactionRect

  • drawRedactionRect(svgDrawingHelper: any, annotationUID: string, rectangleUID: string, start: any, end: any, options?: {}): void
  • Parameters

    • svgDrawingHelper: any
    • annotationUID: string
    • rectangleUID: string
    • start: any
    • end: any
    • options: {} = {}

    Returns void

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

setAttributesIfNecessary

  • setAttributesIfNecessary(attributes: any, svgNode: any): void
  • Parameters

    • attributes: any
    • svgNode: any

    Returns void

setNewAttributesIfValid

  • setNewAttributesIfValid(attributes: any, svgNode: any): void
  • Parameters

    • attributes: any
    • svgNode: any

    Returns void