MCPcopy Create free account
hub / github.com/bk138/multivnc / onUpdateTimer

Method onUpdateTimer

src/gui/ViewerWindow.cpp:169–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167
168
169void VNCCanvas::onUpdateTimer(wxTimerEvent& event)
170{
171 // get the update rect list
172 wxRegionIterator upd(updated_area);
173 while(upd)
174 {
175 wxRect update_rect(upd.GetRect());
176
177 if(scale_factor != 1.0) {
178 update_rect.x *= scale_factor;
179 update_rect.y *= scale_factor;
180 update_rect.width *= scale_factor;
181 update_rect.height *= scale_factor;
182
183 // fixes artifacts. +2 because double->int cuttofs can happen for x,y _and_ w,h scaling
184 update_rect.width += 2;
185 update_rect.height += 2;
186 }
187
188 wxLogDebug(wxT("VNCCanvas %p: invalidating updated rect: (%i,%i,%i,%i)"),
189 this,
190 update_rect.x,
191 update_rect.y,
192 update_rect.width,
193 update_rect.height);
194
195 // triggers onPaint()
196 Refresh(false, &update_rect);
197 ++upd;
198 }
199
200 updated_area.Clear();
201
202}
203
204
205void VNCCanvas::onPaint(wxPaintEvent &WXUNUSED(event))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected