Bug #1926
Updated by Chris Cannam about 5 years ago
We have quite a mess of accessors and calculators for display/value extents (i.e. vertical extents) of layers:
@Layer::getValueExtents@ (pv, implemented in individual layers)
* returns min, max, logarithmic, and unit
* typically returns actual extents of data in model, if meaningful
@Layer::getDisplayExtents@ (pv, implemented in individual layers)
* returns min and max only (not unit or logarithmic)
* returns extents that have been set with @setDisplayExtents@, if any (for zoom and vertical scrolling)
* otherwise typically returns full value extents
* explicitly returns no-values in layers set to auto-align
* NB typically an awkward relationship with @Layer::getCurrentVerticalZoomStep@/@setVerticalZoomStep@
@VerticalScaleLayer::getScaleUnits@ (pv, implemented in individual layers)
* also has @getYForValue@ and @getValueForY@
* used by @LinearNumericalScale@ and @LogNumericalScale@ which actually draw scales
@LayerGeometryProvider::getValueExtents@ (pv, implemented in @View@)
* returns min, max, and logarithmic
* takes unit as an argument, rather than returning it
* if any layers having that unit also have display extents (i.e. are not auto-align layers), returns the display (not value) extents of the lowest (??) such layer
* otherwise returns min and max of all the value extents offered by layers having that unit
* called when calculating y/value mapping in some layers when in auto-align mode
@Pane::getTopLayerDisplayExtents@
* returns all of value min/max, display min/max, and unit (but not logarithmic)
* returns extents taken directly from the top layer, not interaction layer or selected layer
* used from within @Pane@ when dragging the pane up or down
* also has corresponding @setTopLayerDisplayExtents@
* was private, but I just made it public to call from @MainWindow@ to support initialisation of layer scale and units when adding an empty box layer on top of a spectrogram (as it appears to be the only one of these that returns the unit)
Tangentially related:
@VerticalBinLayer@ functions (pv, implemented in individual layers)
* @getYForBin@, @getIYForBin@, @getBinForY@, @getIBinForY@
* used by @Colour3DPlotRenderer@
@DenseThreeDimensionalModel@ functions
* @getBinValue@, @getBinValueUnit@, @shouldUseLogValueScale@ @getBinValueUnit@
* These were added when planning to unify the layer scales for FFT models (Hz assumed) and other colour 3d plots produced by plugins (e.g. ones that are also spectrograms)
@Layer::getValueExtents@ (pv, implemented in individual layers)
* returns min, max, logarithmic, and unit
* typically returns actual extents of data in model, if meaningful
@Layer::getDisplayExtents@ (pv, implemented in individual layers)
* returns min and max only (not unit or logarithmic)
* returns extents that have been set with @setDisplayExtents@, if any (for zoom and vertical scrolling)
* otherwise typically returns full value extents
* explicitly returns no-values in layers set to auto-align
* NB typically an awkward relationship with @Layer::getCurrentVerticalZoomStep@/@setVerticalZoomStep@
@VerticalScaleLayer::getScaleUnits@ (pv, implemented in individual layers)
* also has @getYForValue@ and @getValueForY@
* used by @LinearNumericalScale@ and @LogNumericalScale@ which actually draw scales
@LayerGeometryProvider::getValueExtents@ (pv, implemented in @View@)
* returns min, max, and logarithmic
* takes unit as an argument, rather than returning it
* if any layers having that unit also have display extents (i.e. are not auto-align layers), returns the display (not value) extents of the lowest (??) such layer
* otherwise returns min and max of all the value extents offered by layers having that unit
* called when calculating y/value mapping in some layers when in auto-align mode
@Pane::getTopLayerDisplayExtents@
* returns all of value min/max, display min/max, and unit (but not logarithmic)
* returns extents taken directly from the top layer, not interaction layer or selected layer
* used from within @Pane@ when dragging the pane up or down
* also has corresponding @setTopLayerDisplayExtents@
* was private, but I just made it public to call from @MainWindow@ to support initialisation of layer scale and units when adding an empty box layer on top of a spectrogram (as it appears to be the only one of these that returns the unit)
Tangentially related:
@VerticalBinLayer@ functions (pv, implemented in individual layers)
* @getYForBin@, @getIYForBin@, @getBinForY@, @getIBinForY@
* used by @Colour3DPlotRenderer@
@DenseThreeDimensionalModel@ functions
* @getBinValue@, @getBinValueUnit@, @shouldUseLogValueScale@ @getBinValueUnit@
* These were added when planning to unify the layer scales for FFT models (Hz assumed) and other colour 3d plots produced by plugins (e.g. ones that are also spectrograms)