Skip to main content
Version: Next

RulerAnnotationStore

Hierarchy

Index

Constructors

constructor

  • RulerAnnotationStore(backendService: BackendService, fileId: number, activeFrame: FrameStore, controlPoints: Point2D[], regionType: RegionType, regionId?: number, rotation?: number, name?: string, color?: string, lineWidth?: number, dashLength?: number): RulerAnnotationStore
  • Parameters

    • backendService: BackendService
    • fileId: number
    • activeFrame: FrameStore
    • controlPoints: Point2D[]
    • regionType: RegionType
    • regionId: number = -1
    • rotation: number = 0
    • name: string = ""
    • color: string = Colors.TURQUOISE5
    • lineWidth: number = 2
    • dashLength: number = 0

    Returns RulerAnnotationStore

Properties

inheritedactiveFrame

activeFrame: FrameStore

auxiliaryLineDashLength

auxiliaryLineDashLength: number = 0

auxiliaryLineVisible

auxiliaryLineVisible: boolean = true

auxiliaryTextVisible

auxiliaryTextVisible: boolean = true

inheritedcolor

color: string

inheritedcontrolPoints

controlPoints: Point2D[]

inheritedcoordinate

coordinate: CoordinateMode

inheritedcreating

creating: boolean

inheriteddashLength

dashLength: number

decimals

decimals: number = 6

inheritedediting

editing: boolean

readonlyinheritedfileId

fileId: number

font

font: Font = Font.HELVETICA

fontSize

fontSize: number = 13

fontStyle

fontStyle: FontStyle = FontStyle.NORMAL

inheritedisSimplePolygon

isSimplePolygon: boolean

inheritedlineRegionSampleWidth

lineRegionSampleWidth: number = 3

inheritedlineWidth

lineWidth: number

inheritedlocked

locked: boolean = false

publicinheritedmodifiedTimestamp

modifiedTimestamp: number

inheritedname

name: string

inheritedregionId

regionId: number

inheritedregionType

regionType: RegionType

inheritedrotation

rotation: number

textOffset

textOffset: Point2D = ...

xTextOffset

xTextOffset: Point2D = ...

yTextOffset

yTextOffset: Point2D = ...

staticreadonlyinheritedAVAILABLE_ANNOTATION_TYPES

AVAILABLE_ANNOTATION_TYPES: Map<RegionType, string> = ...

staticreadonlyinheritedAVAILABLE_REGION_TYPES

AVAILABLE_REGION_TYPES: Map<RegionType, string> = ...

staticreadonlyinheritedMAX_DASH_LENGTH

MAX_DASH_LENGTH: 50 = 50

staticreadonlyinheritedMAX_LABEL_OFFSET

MAX_LABEL_OFFSET: 50 = 50

staticreadonlyinheritedMAX_LINE_WIDTH

MAX_LINE_WIDTH: 10 = 10

staticreadonlyinheritedMIN_LABEL_OFFSET

MIN_LABEL_OFFSET: -50 = -50

staticreadonlyinheritedMIN_LINE_WIDTH

MIN_LINE_WIDTH: 0.5 = 0.5

staticreadonlyinheritedTARGET_VERTEX_COUNT

TARGET_VERTEX_COUNT: 200 = 200

Accessors

inheritedboundingBox

  • Returns Point2D

inheritedboundingBoxArea

  • get boundingBoxArea(): number
  • Returns number

inheritedcenter

  • Returns Point2D

inheritedisAnnotation

  • get isAnnotation(): boolean
  • Returns boolean

inheritedisClosedRegion

  • get isClosedRegion(): boolean
  • Returns boolean

inheritedisPreviewCut

  • get isPreviewCut(): boolean
  • Returns boolean

inheritedisTemporary

  • get isTemporary(): boolean
  • Returns boolean

inheritedisValid

  • get isValid(): boolean
  • Returns boolean

inheritednameString

  • get nameString(): string
  • Returns string

inheritedregionProperties

  • get regionProperties(): string
  • Returns string

inheritedsize

  • Returns the sizes of regions and annotations. For line regions and annotations, vector annotations, and ruler annotations, returns x and y absolute displacements.


    Returns Point2D

    The x and y size components.

inheritedwcsSize

  • Returns Point2D

Methods

inheritedbeginCreating

  • beginCreating(): void
  • Returns void

inheritedbeginEditing

  • beginEditing(): void
  • Returns void

inheritedendCreating

  • endCreating(): Generator<Promise<ISetRegionAck>, void, unknown>
  • Returns Generator<Promise<ISetRegionAck>, void, unknown>

inheritedendEditing

  • endEditing(): void
  • Returns void

inheritedfocusCenter

  • focusCenter(): void
  • Returns void

publicgetAnnotationStyles

  • getAnnotationStyles(): { auxiliaryLineDashLength: number; auxiliaryLineVisible: boolean; auxiliaryTextVisible: boolean; font: Font; fontSize: number; fontStyle: FontStyle; textOffset: Point2D; xTextOffset: Point2D; yTextOffset: Point2D }
  • Returns { auxiliaryLineDashLength: number; auxiliaryLineVisible: boolean; auxiliaryTextVisible: boolean; font: Font; fontSize: number; fontStyle: FontStyle; textOffset: Point2D; xTextOffset: Point2D; yTextOffset: Point2D }

    • auxiliaryLineDashLength: number
    • auxiliaryLineVisible: boolean
    • auxiliaryTextVisible: boolean
    • font: Font
    • fontSize: number
    • fontStyle: FontStyle
    • textOffset: Point2D
    • xTextOffset: Point2D
    • yTextOffset: Point2D

publicgetAnnotationStylesForExport

  • getAnnotationStylesForExport(): { coordinateSystem: string; font: Font; fontSize: number; fontStyle: FontStyle }
  • Returns { coordinateSystem: string; font: Font; fontSize: number; fontStyle: FontStyle }

    • coordinateSystem: string
    • font: Font
    • fontSize: number
    • fontStyle: FontStyle

publicgetCurveApproximation

  • getCurveApproximation(wcsInfo: FrameSet, mapping?: Mapping): { corner: Point2D; hypotenuseApproximatePoints: number[]; xApproximatePoints: number[]; yApproximatePoints: number[] }
  • Parameters

    • wcsInfo: FrameSet
    • optionalmapping: Mapping

    Returns { corner: Point2D; hypotenuseApproximatePoints: number[]; xApproximatePoints: number[]; yApproximatePoints: number[] }

    • corner: Point2D
    • hypotenuseApproximatePoints: number[]
    • xApproximatePoints: number[]
    • yApproximatePoints: number[]

publicinheritedgetRegionApproximation

  • getRegionApproximation(astTransform: Mapping): Point2D[]
  • Parameters

    • astTransform: Mapping

    Returns Point2D[]

publicinitializeStyles

  • initializeStyles(annotationStyles: { auxiliaryLineDashLength: number; auxiliaryLineVisible: boolean; auxiliaryTextVisible: boolean; font: Font; fontSize: number; fontStyle: FontStyle; textOffset: Point2D; xTextOffset: Point2D; yTextOffset: Point2D }): void
  • Parameters

    • annotationStyles: { auxiliaryLineDashLength: number; auxiliaryLineVisible: boolean; auxiliaryTextVisible: boolean; font: Font; fontSize: number; fontStyle: FontStyle; textOffset: Point2D; xTextOffset: Point2D; yTextOffset: Point2D }
      • auxiliaryLineDashLength: number
      • auxiliaryLineVisible: boolean
      • auxiliaryTextVisible: boolean
      • font: Font
      • fontSize: number
      • fontStyle: FontStyle
      • textOffset: Point2D
      • xTextOffset: Point2D
      • yTextOffset: Point2D

    Returns void

setAuxiliaryLineDashLength

  • setAuxiliaryLineDashLength(length: number): void
  • Parameters

    • length: number

    Returns void

setAuxiliaryLineVisible

  • setAuxiliaryLineVisible(isVisible: boolean): void
  • Parameters

    • isVisible: boolean

    Returns void

setAuxiliaryTextVisible

  • setAuxiliaryTextVisible(isVisible: boolean): void
  • Parameters

    • isVisible: boolean

    Returns void

inheritedsetCenter

  • setCenter(p: Point2D, skipUpdate?: boolean): void
  • Parameters

    • p: Point2D
    • skipUpdate: boolean = false

    Returns void

inheritedsetColor

  • setColor(color: string): void
  • Parameters

    • color: string

    Returns void

inheritedsetControlPoint

  • setControlPoint(index: number, p: Point2D, skipUpdate?: boolean): void
  • Parameters

    • index: number
    • p: Point2D
    • skipUpdate: boolean = false

    Returns void

inheritedsetControlPoints

  • setControlPoints(points: Point2D[], skipUpdate?: boolean, shapeChanged?: boolean): void
  • Parameters

    • points: Point2D[]
    • skipUpdate: boolean = false
    • shapeChanged: boolean = true

    Returns void

inheritedsetCoordinate

  • Parameters

    Returns void

inheritedsetDashLength

  • setDashLength(dashLength: number): void
  • Parameters

    • dashLength: number

    Returns void

setDecimals

  • setDecimals(decimals: number): void
  • Parameters

    • decimals: number

    Returns void

setFont

  • setFont(font: Font): void
  • Parameters

    Returns void

setFontSize

  • setFontSize(fontSize: number): void
  • Parameters

    • fontSize: number

    Returns void

setFontStyle

  • setFontStyle(fontStyle: string): void
  • Parameters

    • fontStyle: string

    Returns void

inheritedsetLineWidth

  • setLineWidth(lineWidth: number): void
  • Parameters

    • lineWidth: number

    Returns void

inheritedsetLocked

  • setLocked(locked: boolean): void
  • Parameters

    • locked: boolean

    Returns void

inheritedsetName

  • setName(name: string): void
  • Parameters

    • name: string

    Returns void

inheritedsetRegionId

  • setRegionId(id: number): void
  • Parameters

    • id: number

    Returns void

inheritedsetRotation

  • setRotation(angle: number, skipUpdate?: boolean): void
  • Parameters

    • angle: number
    • skipUpdate: boolean = false

    Returns void

inheritedsetSize

  • setSize(p: Point2D, skipUpdate?: boolean): void
  • Sets the size for regions and annotations


    Parameters

    • p: Point2D

      Specifies the x and y size components. For line regions and annotations, vector annotations, and ruler annotations, the function sets the new start and end positions while keeping the rotation within the same quadrant.

    • skipUpdate: boolean = false

      Whether to update the changes with the backend.

    Returns void

setTextOffset

  • setTextOffset(offset: number, isX: boolean): void
  • Parameters

    • offset: number
    • isX: boolean

    Returns void

setXTextOffset

  • setXTextOffset(offset: number, isX: boolean): void
  • Parameters

    • offset: number
    • isX: boolean

    Returns void

setYTextOffset

  • setYTextOffset(offset: number, isX: boolean): void
  • Parameters

    • offset: number
    • isX: boolean

    Returns void

inheritedtoggleLock

  • toggleLock(): void
  • Returns void

publicstaticinheritedGetRegionProperties

  • GetRegionProperties(regionType: RegionType, controlPoints: Point2D[], rotation: number): string
  • Parameters

    • regionType: RegionType
    • controlPoints: Point2D[]
    • rotation: number

    Returns string

publicstaticinheritedIsRegionCustomIcon

  • IsRegionCustomIcon(regionType: RegionType): boolean
  • Parameters

    • regionType: RegionType

    Returns boolean

publicstaticinheritedIsRegionDashLengthValid

  • IsRegionDashLengthValid(regionDashLength: number): boolean
  • Parameters

    • regionDashLength: number

    Returns boolean

publicstaticinheritedIsRegionLineWidthValid

  • IsRegionLineWidthValid(regionLineWidth: number): boolean
  • Parameters

    • regionLineWidth: number

    Returns boolean

publicstaticinheritedIsRegionTypeValid

  • IsRegionTypeValid(regionType: RegionType): boolean
  • Parameters

    • regionType: RegionType

    Returns boolean

publicstaticinheritedRegionIconString

  • RegionIconString(regionType: RegionType): any
  • Parameters

    • regionType: RegionType

    Returns any

publicstaticinheritedRegionTypeString

  • RegionTypeString(regionType: RegionType): string
  • Parameters

    • regionType: RegionType

    Returns string