* 0x004C5EA9 * * @param w * @param left @ * @param top @ * @param right @ * @param bottom @ */
| 1834 | * @param bottom @<bp> |
| 1835 | */ |
| 1836 | static void windowDraw(Gfx::DrawingContext& ctx, Ui::Window* w, int32_t left, int32_t top, int32_t right, int32_t bottom) |
| 1837 | { |
| 1838 | if (!w->isVisible()) |
| 1839 | { |
| 1840 | return; |
| 1841 | } |
| 1842 | |
| 1843 | // Split window into only the regions that require drawing |
| 1844 | if (windowDrawSplit(ctx, w, left, top, right, bottom)) |
| 1845 | { |
| 1846 | return; |
| 1847 | } |
| 1848 | |
| 1849 | // Clamp region |
| 1850 | left = std::max(left, w->x); |
| 1851 | top = std::max(top, w->y); |
| 1852 | right = std::min(right, w->x + w->width); |
| 1853 | bottom = std::min(bottom, w->y + w->height); |
| 1854 | if (left >= right) |
| 1855 | { |
| 1856 | return; |
| 1857 | } |
| 1858 | if (top >= bottom) |
| 1859 | { |
| 1860 | return; |
| 1861 | } |
| 1862 | |
| 1863 | // Draw the window in this region |
| 1864 | drawSingle(ctx, w, left, top, right, bottom); |
| 1865 | |
| 1866 | for (auto index = indexOf(*w) + 1; index < count(); index++) |
| 1867 | { |
| 1868 | auto* v = get(index); |
| 1869 | |
| 1870 | // Don't draw overlapping opaque windows, they won't have changed |
| 1871 | if (!v->isTranslucent()) |
| 1872 | { |
| 1873 | continue; |
| 1874 | } |
| 1875 | |
| 1876 | drawSingle(ctx, v, left, top, right, bottom); |
| 1877 | } |
| 1878 | } |
| 1879 | |
| 1880 | static void windowDraw(Gfx::DrawingContext& ctx, Window* w, Rect rect) |
| 1881 | { |
no test coverage detected