MCPcopy Create free account
hub / github.com/AgoraIO/API-Examples / OnPaint

Method OnPaint

windows/APIExample/APIExample/AGVideoWnd.cpp:135–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void CAGInfoWnd::OnPaint()
136{
137 CPaintDC dc(this);
138 CRect rcClient;
139 CString strTip;
140
141 dc.SetBkMode(TRANSPARENT);
142 dc.SetTextColor(RGB(0xFF, 0xFF, 0xFF));
143
144 if (m_bShowTip) {
145 // 640x480,15fps,400k
146 GetClientRect(&rcClient);
147 rcClient.top += 4;
148 if (m_isRemote) {
149 strTip.Format(_T("%dx%d, %dfps\nVRecv: %dkbps\nVLossRate: %d%%\nVDelay: %dms\nARecv: %dkbps\nALossRate: %d%%\nADelay: %dms"),
150 m_nWidth, m_nHeight, m_nFps, m_nVideoBitrate, m_nVideoLossRate, m_nVideoDelay, m_nAudioBitrate, m_nAudioLossRate, m_nAudioDelay);
151 }
152 else {
153 strTip.Format(_T("%dx%d, %dfps\nVSent: %dkbps\nVLossRate: %d%%\nASent: %dkbps\nALossRate: %d%%"),
154 m_nWidth, m_nHeight, m_nFps, m_nVideoBitrate, m_nVideoLossRate, m_nAudioBitrate, m_nAudioLossRate);
155 }
156
157 dc.DrawText(strTip, &rcClient, DT_VCENTER | DT_CENTER);
158 }
159}
160
161BOOL CAGInfoWnd::OnEraseBkgnd(CDC* pDC)
162{

Callers

nothing calls this directly

Calls 1

FormatMethod · 0.80

Tested by

no test coverage detected