MCPcopy Create free account
hub / github.com/cuberite/cuberite / OnPaint

Method OnPaint

Tools/BiomeVisualiser/BiomeViewWnd.cpp:200–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198
199
200LRESULT cBiomeViewWnd::OnPaint(void)
201{
202 PAINTSTRUCT ps;
203 HDC DC = BeginPaint(m_Wnd, &ps);
204
205 RECT rc;
206 GetClientRect(m_Wnd, &rc);
207 int Wid = rc.right - rc.left;
208 int Hei = rc.bottom - rc.top;
209 if ((m_Pixmap.GetWidth() != Wid) || (m_Pixmap.GetHeight() != Hei))
210 {
211 m_Pixmap.SetSize(Wid, Hei);
212 if (m_Renderer.Render(m_Pixmap))
213 {
214 SetTimer(m_Wnd, TIMER_RERENDER, 200, NULL);
215 }
216 }
217
218 m_Pixmap.DrawToDC(DC, 0, 0);
219
220 EndPaint(m_Wnd, &ps);
221 return 0;
222}
223
224
225

Callers

nothing calls this directly

Calls 5

RenderMethod · 0.80
DrawToDCMethod · 0.80
GetWidthMethod · 0.45
GetHeightMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected