mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
screen
This commit is contained in:
parent
1926586d0f
commit
f12c6fff88
@ -92,6 +92,10 @@ def imageCut(hwnd, x1, y1, x2, y2, viscompare=True, rawimage=False) -> QImage:
|
|||||||
desktop.width(),
|
desktop.width(),
|
||||||
desktop.height(),
|
desktop.height(),
|
||||||
)
|
)
|
||||||
|
x1 = x1 - desktop.x()
|
||||||
|
y1 = y1 - desktop.y()
|
||||||
|
x2 = x2 - desktop.x()
|
||||||
|
y2 = y2 - desktop.y()
|
||||||
pix = pix.copy(x1, y1, x2 - x1, y2 - y1)
|
pix = pix.copy(x1, y1, x2 - x1, y2 - y1)
|
||||||
else:
|
else:
|
||||||
pix = screen.grabWindow(
|
pix = screen.grabWindow(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user