mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-26 20:32:06 +00:00
fix(automation): capture screenshot.window from the composited screen
Blitting from the MainFrame's own wxClientDC clips out child HWNDs, so all of OrcaSlicer's custom child-window controls (sidebar buttons/combos/panels) and the GL canvas came back as uninitialized black bitmap memory. Read the window's on-screen rectangle from the DWM-composited desktop via wxScreenDC instead, which includes every child window, the OpenGL surface, and ImGui overlays. Document the visible/unobscured requirement and the HiDPI logical-vs-physical pixel caveat; clarify how screenshot.viewport3d differs and why it stays.
This commit is contained in:
@@ -59,7 +59,7 @@ def main() -> int:
|
||||
with open("window.png", "wb") as f:
|
||||
f.write(orca.screenshot())
|
||||
with open("preview_3d.png", "wb") as f:
|
||||
f.write(orca.screenshot_3d(width=1024, height=768))
|
||||
f.write(orca.screenshot_3d(width=1920, height=1080))
|
||||
print("wrote window.png and preview_3d.png")
|
||||
return 0
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user