Maps decibels to a vertical pixel position on a linear axis (dB is already logarithmic in amplitude, so the axis itself is linear in dB).
More...
#include <graph_scale.hpp>
|
| float | to_y (float db) const |
| float | to_decibels (float py) const |
| std::vector< float > | ticks (float step_db) const |
| | Gridline values every step_db, always including 0 dB when it is in range (the unity line a reader looks for first).
|
|
| float | min_db = -24.0f |
| float | max_db = 24.0f |
| float | y = 0.0f |
| | top edge, pixels
|
| float | height = 0.0f |
| | axis height, pixels
|
Maps decibels to a vertical pixel position on a linear axis (dB is already logarithmic in amplitude, so the axis itself is linear in dB).
y grows downward, as in screen coordinates: max_db sits at the top.
◆ ticks()
| std::vector< float > pulp::view::DecibelScale::ticks |
( |
float | step_db | ) |
const |
Gridline values every step_db, always including 0 dB when it is in range (the unity line a reader looks for first).
◆ to_decibels()
| float pulp::view::DecibelScale::to_decibels |
( |
float | py | ) |
const |
◆ to_y()
| float pulp::view::DecibelScale::to_y |
( |
float | db | ) |
const |
◆ height
| float pulp::view::DecibelScale::height = 0.0f |
◆ max_db
| float pulp::view::DecibelScale::max_db = 24.0f |
◆ min_db
| float pulp::view::DecibelScale::min_db = -24.0f |
| float pulp::view::DecibelScale::y = 0.0f |
The documentation for this struct was generated from the following file: