Update docs
This commit is contained in:
@@ -180,16 +180,19 @@ def capture_screen_with_cursor():
|
||||
|
||||
return (cursor, hotspot)
|
||||
|
||||
cursor, (hotspotx, hotspoty) = get_cursor()
|
||||
|
||||
ratio = ctypes.windll.shcore.GetScaleFactorForDevice(0) / 100
|
||||
|
||||
img = ImageGrab.grab(bbox=None, include_layered_windows=True)
|
||||
|
||||
pos_win = win32gui.GetCursorPos()
|
||||
pos = (round(pos_win[0]*ratio - hotspotx), round(pos_win[1]*ratio - hotspoty))
|
||||
try:
|
||||
cursor, (hotspotx, hotspoty) = get_cursor()
|
||||
|
||||
img.paste(cursor, pos, cursor)
|
||||
pos_win = win32gui.GetCursorPos()
|
||||
pos = (round(pos_win[0]*ratio - hotspotx), round(pos_win[1]*ratio - hotspoty))
|
||||
|
||||
img.paste(cursor, pos, cursor)
|
||||
except:
|
||||
pass
|
||||
|
||||
img.save(file_path)
|
||||
elif user_platform == "Linux":
|
||||
|
||||
Reference in New Issue
Block a user