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

constructor

Properties

Private mBottomLine

mBottomLine: number[]

Internal array for the bottomline

Private mRules

Engraving rules for formatting

Private mSkyLine

mSkyLine: number[]

Internal array for the skyline

Private mStaffLineParent

mStaffLineParent: StaffLine

Parent Staffline where the skyline and bottom line is attached

Accessors

BottomLine

  • get BottomLine(): number[]

SamplingUnit

  • get SamplingUnit(): number

SkyLine

  • get SkyLine(): number[]

StaffLineParent

Methods

calculateLines

  • calculateLines(): void

Private drawPixel

getBottomLineMax

  • getBottomLineMax(): number

getBottomLineMaxAtPoint

  • getBottomLineMaxAtPoint(point: number): number

getBottomLineMaxInBoundingBox

  • 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

  • getBottomLineMaxInRange(startIndex: number, endIndex: number): number

getLeftIndexForPointX

  • getLeftIndexForPointX(x: number, length: number): number

Private getMaxInRange

  • getMaxInRange(skyBottomArray: number[], startIndex: number, endIndex: number): number

Private getMinInRange

  • 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

  • getRightIndexForPointX(x: number, length: number): number

getSkyLineMin

  • getSkyLineMin(): number

getSkyLineMinAtPoint

  • getSkyLineMinAtPoint(point: number): number

getSkyLineMinInRange

  • getSkyLineMinInRange(startIndex: number, endIndex: number): number

resetBottomLineInRange

  • resetBottomLineInRange(startIndex: number, endIndex: number): void

resetSkyLineInRange

  • resetSkyLineInRange(startIndex: number, endIndex: number): void

setBottomLineWithValue

  • setBottomLineWithValue(value: number): void

Private setInRange

  • 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

    • Default value startIndex: number = 0

      start index to begin with (default: 0)

    • Default value endIndex: number = array.length

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

    • Default value value: number = 0

      value to fill in (default: 0)

    Returns void

setSkyLineWithValue

  • setSkyLineWithValue(value: number): void

updateBottomLineInRange

  • updateBottomLineInRange(startIndex: number, endIndex: number, value: number): void

updateBottomLineWithWedge

Private updateInRange

  • 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

    • Default value startIndex: number = 0

      start index to begin with (default: 0)

    • Default value endIndex: number = array.length

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

    • Default value value: number = 0

      value to fill in (default: 0)

    Returns void

updateSkyLineInRange

  • updateSkyLineInRange(startIndex: number, endIndex: number, value: number): void

updateSkyLineWithWedge

updateStaffLineBorders

  • updateStaffLineBorders(): void

updateWithBoundingBoxRecursivly

  • updateWithBoundingBoxRecursivly(boundingBox: BoundingBox): void

Generated using TypeDoc