部件选取

This commit is contained in:
李志鹏
2026-01-26 16:16:40 +08:00
parent ba49b02ebe
commit 9cecbdcf9b
11 changed files with 245 additions and 144 deletions

View File

@@ -1045,6 +1045,7 @@ export async function imageToCanvas(image, scale = 1, sr = false) {
/**
* 图片边界跟踪算法(透明底)
* @param {HTMLCanvasElement} canvas - canvas元素
* @param {Number} scale - 缩放比例
* @returns {Array} 边界点数组 [{x, y}, ...]
*/
export function traceImageContour(canvas) {