const path = new Path2D("M10 10 h80 v80 h-80 Z"); // 提取路径的命令和参数 const commands = path.toString().match(/[A-Za-z]\d+|[A-Za-z]/g); // 计算路径的几何中心点坐标 let centerX = 0; let centerY = 0; for (let i = 0; i <
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号