Do a bit of documenting of audio display drawing functions.

Originally committed to SVN as r3345.
This commit is contained in:
Niels Martin Hansen 2009-08-01 02:32:26 +00:00
parent db6e3d84c1
commit a5a8665859

View file

@ -188,9 +188,10 @@ void AudioDisplay::UpdateImage(bool weak) {
} }
/// @brief DOCME /// @brief Actually update the image on the display
/// @return
/// ///
/// This is where most actual drawing of the audio display happens, or other functions
/// to draw specific parts are called from.
void AudioDisplay::DoUpdateImage() { void AudioDisplay::DoUpdateImage() {
// Loaded? // Loaded?
if (!loaded || !provider) return; if (!loaded || !provider) return;
@ -412,10 +413,10 @@ void AudioDisplay::DoUpdateImage() {
/// @brief Draw Inactive Lines /// @brief Draw other lines than the current active
/// @param dc /// @param dc The DC to draw to.
/// @return
/// ///
/// Draws markers for inactive lines, eg. the previous line, per configuration.
void AudioDisplay::DrawInactiveLines(wxDC &dc) { void AudioDisplay::DrawInactiveLines(wxDC &dc) {
// Check if there is anything to do // Check if there is anything to do
int shadeType = Options.AsInt(_T("Audio Inactive Lines Display Mode")); int shadeType = Options.AsInt(_T("Audio Inactive Lines Display Mode"));
@ -489,9 +490,8 @@ void AudioDisplay::DrawInactiveLines(wxDC &dc) {
/// @brief Draw keyframes /// @brief Draw keyframe markers
/// @param dc /// @param dc The DC to draw to.
///
void AudioDisplay::DrawKeyframes(wxDC &dc) { void AudioDisplay::DrawKeyframes(wxDC &dc) {
wxArrayInt KeyFrames = VideoContext::Get()->GetKeyFrames(); wxArrayInt KeyFrames = VideoContext::Get()->GetKeyFrames();
int nKeys = (int)KeyFrames.Count(); int nKeys = (int)KeyFrames.Count();
@ -514,9 +514,8 @@ void AudioDisplay::DrawKeyframes(wxDC &dc) {
/// @brief Draw timescale /// @brief Draw timescale at bottom of audio display
/// @param dc /// @param dc The DC to draw to.
///
void AudioDisplay::DrawTimescale(wxDC &dc) { void AudioDisplay::DrawTimescale(wxDC &dc) {
// Set size // Set size
int timelineHeight = Options.AsBool(_T("Audio Draw Timeline")) ? 20 : 0; int timelineHeight = Options.AsBool(_T("Audio Draw Timeline")) ? 20 : 0;
@ -581,10 +580,9 @@ void AudioDisplay::DrawTimescale(wxDC &dc) {
/// @brief Waveform /// @brief Draw audio waveform
/// @param dc /// @param dc The DC to draw to.
/// @param weak /// @param weak False if the visible portion of the display has changed.
///
void AudioDisplay::DrawWaveform(wxDC &dc,bool weak) { void AudioDisplay::DrawWaveform(wxDC &dc,bool weak) {
// Prepare Waveform // Prepare Waveform
if (!weak || peak == NULL || min == NULL) { if (!weak || peak == NULL || min == NULL) {
@ -627,9 +625,11 @@ void AudioDisplay::DrawWaveform(wxDC &dc,bool weak) {
/// @brief Draw spectrum analyzer /// @brief Draw spectrum analyzer
/// @param finaldc /// @param finaldc The DC to draw to.
/// @param weak /// @param weak False if the visible portion of the display has changed.
/// ///
/// @bug Slow when non-weak and the selection has to be drawn, see:
/// @issue 951 Spectrum view scrolls/updates considerably slower when selection is visible
void AudioDisplay::DrawSpectrum(wxDC &finaldc,bool weak) { void AudioDisplay::DrawSpectrum(wxDC &finaldc,bool weak) {
if (!weak || !spectrumDisplay || spectrumDisplay->GetWidth() != w || spectrumDisplay->GetHeight() != h) { if (!weak || !spectrumDisplay || spectrumDisplay->GetWidth() != w || spectrumDisplay->GetHeight() != h) {
if (spectrumDisplay) { if (spectrumDisplay) {