Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
- memcpy(tpcopy, tp, count);
- GetObjectW(hBitmap, sizeof(BITMAP), &structBitmapHeader);
- set_rect(&rect, 0, 0, structBitmapHeader.bmWidth, structBitmapHeader.bmHeight);
- /* Ignore data that is not meant for drawing */
- if (rect.Width == 1 && rect.Height == 1)
return;
- /* DC attributes were not set, assume client area */
- if (rect.Width == 0 && rect.Height == 0)
- {
RECT lpRect;
GetClientRect(graphics->hwnd, &lpRect);
rect.Width = lpRect.right;
rect.Height = lpRect.bottom;
- }
We already have the `get_graphics_device_bounds` function for this.