feat(scanner): validate elevated live automation
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { clampRect, type LayoutRect } from "./layoutProfile";
|
||||
import type { Bitmap } from "./ocrPreprocess";
|
||||
import { clampRect, type LayoutRect } from "./layoutProfile.js";
|
||||
import type { Bitmap } from "./ocrPreprocess.js";
|
||||
|
||||
// EXPERIMENTAL, read-only lock-status detection (nice-to-have). Genshin shows a
|
||||
// padlock at the top-right of the artifact detail card: a bright gold fill when
|
||||
@@ -15,10 +15,10 @@ import type { Bitmap } from "./ocrPreprocess";
|
||||
export function lockIconCropRect(detailRect: LayoutRect, imageSize: { width: number; height: number }): LayoutRect {
|
||||
return clampRect(
|
||||
{
|
||||
x: Math.round(detailRect.x + detailRect.width * 0.8),
|
||||
y: Math.round(detailRect.y + detailRect.height * 0.03),
|
||||
width: Math.round(detailRect.width * 0.16),
|
||||
height: Math.round(detailRect.height * 0.09),
|
||||
x: Math.round(detailRect.x + detailRect.width * 0.735),
|
||||
y: Math.round(detailRect.y + detailRect.height * 0.355),
|
||||
width: Math.round(detailRect.width * 0.105),
|
||||
height: Math.round(detailRect.height * 0.07),
|
||||
},
|
||||
imageSize,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user