mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-21 11:42:44 +08:00
ref: 优化取色功能
This commit is contained in:
parent
efccc2b091
commit
2d2743cbb1
@ -85,7 +85,13 @@ class Listener {
|
||||
|
||||
init(mainWindow) {
|
||||
this.fn = throttle(({x, y}, picker) => {
|
||||
const img = robot.screen.capture(parseInt(x) - 5, parseInt(y) - 5, 9, 9);
|
||||
const { scaleFactor } = screen.getDisplayNearestPoint({x, y});
|
||||
const img = robot.screen.capture(
|
||||
x - parseInt(5 / scaleFactor),
|
||||
y - parseInt(5 / scaleFactor),
|
||||
10,
|
||||
10
|
||||
);
|
||||
|
||||
const colors = {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user