Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SkyBottomLineCalculator

This class calculates and holds the skyline and bottom line information. It also has functions to update areas of the two lines if new elements are added to the staffline (e.g. measure number, annotations, ...)

Hierarchy

  • SkyBottomLineCalculator

Index

Constructors

Properties

mBottomLine: number[]

Internal array for the bottomline

Engraving rules for formatting

mSkyLine: number[]

Internal array for the skyline

mStaffLineParent: StaffLine

Parent Staffline where the skyline and bottom line is attached

Accessors

  • get BottomLine(): number[]
  • get SamplingUnit(): number
  • get SkyLine(): number[]

Methods

  • calculateLines(): void
  • findNextValidNumber(start: number, tSkyLine: number[]): number
  • go forward through the skyline array and find a number so that we can properly calculate the average

    Parameters

    • start: number

      the starting index of the search

    • tSkyLine: number[]

      the skyline to search through

    Returns number

  • findPreviousValidNumber(start: number, tSkyLine: number[]): number
  • go backwards through the skyline array and find a number so that we can properly calculate the average

    Parameters

    • start: number

      the starting index of the search

    • tSkyLine: number[]

      the skyline to search through

    Returns number

  • getBottomLineMax(): number
  • getBottomLineMaxAtPoint(point: number): number
  • getBottomLineMaxInBoundingBox(boundingBox: BoundingBox): number
  • This method returns the maximum value of the bottom line around a specific bounding box. Will return undefined if the bounding box is not valid or inside staffline

    Parameters

    • boundingBox: BoundingBox

      Bounding box where the maximum should be retrieved from

    Returns number

    Maximum value inside bounding box boundaries or undefined if not possible

  • getBottomLineMaxInRange(startIndex: number, endIndex: number): number
  • getLeftIndexForPointX(x: number, length: number): number
  • getMaxInRange(skyBottomArray: number[], startIndex: number, endIndex: number): number
  • getMinInRange(skyBottomArray: number[], startIndex: number, endIndex: number): number
  • Get all values of the selected line inside the given range

    Parameters

    • skyBottomArray: number[]

      Skyline or bottom line

    • startIndex: number

      start index

    • endIndex: number

      end index (including)

    Returns number

  • getRightIndexForPointX(x: number, length: number): number
  • getSkyLineMin(): number
  • getSkyLineMinAtPoint(point: number): number
  • getSkyLineMinInRange(startIndex: number, endIndex: number): number
  • resetBottomLineInRange(startIndex: number, endIndex: number): void
  • resetSkyLineInRange(startIndex: number, endIndex: number): void
  • setBottomLineWithValue(value: number): void
  • setInRange(array: number[], startIndex?: number, endIndex?: number, value?: number): void
  • Sets the value given to the range inside the array. NOTE: will always update the value

    Parameters

    • array: number[]

      Array to fill in the new value

    • startIndex: number = 0

      start index to begin with (default: 0)

    • endIndex: number = array.length

      end index of array (excluding, default: array length)

    • value: number = 0

      value to fill in (default: 0)

    Returns void

  • setSkyLineWithValue(value: number): void
  • updateBottomLineInRange(startIndex: number, endIndex: number, value: number): void
  • This method updates the BottomLine for a given range with a given value

    Parameters

    • startIndex: number

      Start index of the range

    • endIndex: number

      End index of the range (excluding)

    • value: number

      ??

    Returns void

  • updateInRange(array: number[], startIndex?: number, endIndex?: number, value?: number): void
  • Update an array with the value given inside a range. NOTE: will only be updated if value > oldValue

    Parameters

    • array: number[]

      Array to fill in the new value

    • startIndex: number = 0

      start index to begin with (default: 0)

    • endIndex: number = array.length

      end index of array (excluding, default: array length)

    • value: number = 0

      value to fill in (default: 0)

    Returns void

  • updateLines(calculationResults: SkyBottomLineCalculationResult[]): void
  • This method updates the skylines and bottomlines for mStaffLineParent.

    Parameters

    • calculationResults: SkyBottomLineCalculationResult[]

      the skylines and bottomlines of mStaffLineParent's measures calculated by SkyBottomLineBatchCalculator

    Returns void

  • updateSkyLineInRange(startIndex: number, endIndex: number, value: number): void
  • This method updates the SkyLine for a given range with a given value //param to update the SkyLine for

    Parameters

    • startIndex: number

      Start index of the range

    • endIndex: number

      End index of the range

    • value: number

      ??

    Returns void

  • updateStaffLineBorders(): void
  • updateWithBoundingBoxRecursively(boundingBox: BoundingBox): void

Generated using TypeDoc