MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OnDraw

Method OnDraw

Source/FamiTrackerView.cpp:384–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382////////////////////////////////////////////////////////////////////////////////////////////////////////////
383
384void CFamiTrackerView::OnDraw(CDC* pDC)
385{
386 // How should we protect the DC in this method?
387
388 // Check document
389 if (!GetDocument()->IsFileLoaded()) {
390 const WCHAR str[] = L"No module loaded."; // // //
391 pDC->FillSolidRect(0, 0, m_iWindowWidth, m_iWindowHeight, 0x000000);
392 pDC->SetTextColor(0xFFFFFF);
393 CRect textRect(0, 0, m_iWindowWidth, m_iWindowHeight);
394 pDC->DrawTextW(str, std::size(str), &textRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
395 return;
396 }
397
398 // Don't draw when rendering to wave file
399 CSoundGen *pSoundGen = FTEnv.GetSoundGenerator();
400 if (pSoundGen == NULL || pSoundGen->IsBackgroundTask())
401 return;
402
403 m_pPatternEditor->DrawScreen(*pDC, this); // // //
404 GetMainFrame()->GetFrameEditor()->DrawScreen(pDC); // // //
405}
406
407BOOL CFamiTrackerView::OnEraseBkgnd(CDC* pDC)
408{

Callers

nothing calls this directly

Calls 6

sizeFunction · 0.85
IsBackgroundTaskMethod · 0.80
IsFileLoadedMethod · 0.45
GetSoundGeneratorMethod · 0.45
DrawScreenMethod · 0.45
GetFrameEditorMethod · 0.45

Tested by

no test coverage detected