mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
issues/773
This commit is contained in:
parent
9d5955ec58
commit
0e38c1d31f
@ -232,6 +232,11 @@ def mouseselectwindow(callback):
|
||||
|
||||
|
||||
def screenshot(x1, y1, x2, y2, hwnd=None):
|
||||
if hwnd:
|
||||
rate = QApplication.instance().devicePixelRatio() / (
|
||||
windows.GetDpiForWindow(hwnd) / 96
|
||||
)
|
||||
x1, y1, x2, y2 = (int(_ / rate) for _ in (x1, y1, x2, y2))
|
||||
bs = winsharedutils.gdi_screenshot(x1, y1, x2, y2, hwnd)
|
||||
pixmap = QPixmap()
|
||||
if bs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user