Sound Meter 0.9.0
Fully resizing logarithmic JUCE meter module.
|
#include <sd_MeterSegment.h>
Public Member Functions | |
Segment (const Options &meterOptions, const SegmentOptions &segmentOptions) | |
Construct a segment using the supplied options. More... | |
void | setLevel (float level_db) |
Set the level in decibels. More... | |
void | draw (juce::Graphics &g, const MeterColours &meterColours) |
Draw the segment. More... | |
void | setMeterBounds (juce::Rectangle< int > meterBounds) |
Set the bounds of the total meter (all segments) More... | |
juce::Rectangle< int > | getSegmentBounds () const noexcept |
Get the bounding box of this segment. More... | |
void | resetPeakHold () noexcept |
Reset the peak hold. More... | |
float | getPeakHold () const noexcept |
Get the peak hold level. More... | |
bool | isDirty () const noexcept |
Check if the segment needs to be re-drawn (dirty). More... | |
void | setIsLabelStrip (bool isLabelStrip=false) noexcept |
Set whether this meter is a label strip. More... | |
void | setMinimalMode (bool minimalMode) noexcept |
Set the meter in 'minimal' mode. More... | |
void | setSegmentOptions (SegmentOptions segmentOptions) |
Set the segment options, describing the range and colour of the segment. More... | |
SegmentOptions | getSegmentOptions () const noexcept |
Get the segment options, describing the range and colour of the segment. More... | |
void | setMeterOptions (const Options &meterOptions) |
Set meter options. More... | |
Options | getMeterOptions () const |
Get segment options. More... | |
sd::SoundMeter::Segment::Segment | ( | const Options & | meterOptions, |
const SegmentOptions & | segmentOptions | ||
) |
Construct a segment using the supplied options.
References setMeterOptions(), and setSegmentOptions().
void sd::SoundMeter::Segment::setLevel | ( | float | level_db | ) |
Set the level in decibels.
void sd::SoundMeter::Segment::draw | ( | juce::Graphics & | g, |
const MeterColours & | meterColours | ||
) |
void sd::SoundMeter::Segment::setMeterBounds | ( | juce::Rectangle< int > | meterBounds | ) |
Set the bounds of the total meter (all segments)
References sd::SoundMeter::SegmentOptions::meterRange, sd::SoundMeter::SegmentOptions::nextSegmentColour, sd::SoundMeter::SegmentOptions::segmentColour, and sd::SoundMeter::Options::useGradient.
Referenced by setSegmentOptions().
|
noexcept |
Get the bounding box of this segment.
|
noexcept |
Reset the peak hold.
References sd::SoundMeter::Constants::kMinLevel_db.
|
noexcept |
Get the peak hold level.
|
noexcept |
Check if the segment needs to be re-drawn (dirty).
|
noexcept |
Set whether this meter is a label strip.
A label strip only draws the value labels (at the tick-marks), but does not display any level.
isLabelStrip | when set, this meter behave like a label strip. |
|
noexcept |
Set the meter in 'minimal' mode.
In minimal mode, the meter is in it's cleanest state possible. This means no header, no tick-marks, no value, no faders and no indicator.
minimalMode | When set to true, 'minimal' mode will be enabled. |
void sd::SoundMeter::Segment::setSegmentOptions | ( | SegmentOptions | segmentOptions | ) |
Set the segment options, describing the range and colour of the segment.
References sd::SoundMeter::SegmentOptions::levelRange, sd::SoundMeter::SegmentOptions::meterRange, and setMeterBounds().
Referenced by Segment().
|
noexcept |
Get the segment options, describing the range and colour of the segment.
void sd::SoundMeter::Segment::setMeterOptions | ( | const Options & | meterOptions | ) |
Set meter options.
References sd::SoundMeter::SegmentOptions::levelRange, and sd::SoundMeter::Options::tickMarks.
Referenced by Segment().
Options sd::SoundMeter::Segment::getMeterOptions | ( | ) | const |
Get segment options.