* From a rectangle that needs redrawing, find the windows that intersect with the rectangle. * These windows should be re-painted. * @param left Left edge of the rectangle that should be repainted * @param top Top edge of the rectangle that should be repainted * @param right Right edge of the rectangle that should be repainted * @param bottom Bottom edge of the rectangle that should be repain
| 945 | * @param bottom Bottom edge of the rectangle that should be repainted |
| 946 | */ |
| 947 | void DrawOverlappedWindowForAll(int left, int top, int right, int bottom) |
| 948 | { |
| 949 | DrawPixelInfo bk; |
| 950 | AutoRestoreBackup dpi_backup(_cur_dpi, &bk); |
| 951 | |
| 952 | for (Window *w : Window::IterateFromBack()) { |
| 953 | if (MayBeShown(w) && |
| 954 | right > w->left && |
| 955 | bottom > w->top && |
| 956 | left < w->left + w->width && |
| 957 | top < w->top + w->height) { |
| 958 | /* Window w intersects with the rectangle => needs repaint */ |
| 959 | DrawOverlappedWindow(w, std::max(left, w->left), std::max(top, w->top), std::min(right, w->left + w->width), std::min(bottom, w->top + w->height)); |
| 960 | } |
| 961 | } |
| 962 | } |
| 963 | |
| 964 | /** |
| 965 | * Mark entire window as dirty (in need of re-paint) |
no test coverage detected