MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / PaintAudio

Method PaintAudio

src/audio_display.cpp:858–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

856}
857
858void AudioDisplay::PaintAudio(wxDC &dc, const TimeRange updtime, const wxRect updrect)
859{
860 auto pt = begin(style_ranges), pe = end(style_ranges);
861 while (pt != pe && pt + 1 != pe && (pt + 1)->first < updtime.begin()) ++pt;
862
863 while (pt != pe && pt->first < updtime.end())
864 {
865 const auto range_style = static_cast<AudioRenderingStyle>(pt->second);
866 const int range_x1 = std::max(updrect.x, RelativeXFromTime(pt->first));
867 int range_x2 = updrect.x + updrect.width;
868 if (++pt != pe)
869 range_x2 = std::min(range_x2, RelativeXFromTime(pt->first));
870
871 if (range_x2 > range_x1)
872 audio_renderer->Render(dc, wxPoint(range_x1, audio_top),
873 range_x1 + scroll_left, range_x2 - range_x1, range_style);
874 }
875}
876
877void AudioDisplay::PaintMarkers(wxDC &dc, TimeRange updtime)
878{

Callers

nothing calls this directly

Calls 5

beginFunction · 0.85
endFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
RenderMethod · 0.45

Tested by

no test coverage detected