| 167 | |
| 168 | |
| 169 | void 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 | |
| 205 | void VNCCanvas::onPaint(wxPaintEvent &WXUNUSED(event)) |
nothing calls this directly
no outgoing calls
no test coverage detected