feat(编辑渲染): 完善三维转换,优化编辑渲染压缩

This commit is contained in:
xiaoqidun committed 2026-10-07 10:26:20 +08:00
1 parent e8344e6387
commit 839f65e3d7
47 files changed
+4887 -112

No files matched your search

+19
View File
@@ -400,6 +400,25 @@ func geometryFromCanvasPath(path *canvas.Path) *GeometryPath {
return &result
}
// clipLinearFillGeometry 裁剪直线填充轮廓,保留原填充规则,不用于区域布尔运算
// 入参: path 闭合绘制轮廓, clip 凸裁剪窗口
// 返回: GeometryPath 填充轮廓, bool 是否适用, error 路径错误
func clipLinearFillGeometry(path, clip GeometryPath) (GeometryPath, bool, error) {
a, err := geometryToCanvasPath(&path)
if err != nil {
return nil, false, err
}
b, err := geometryToCanvasPath(&clip)
if err != nil {
return nil, false, err
}
result, ok := intersectLinearCanvasContours(a, b)
if !ok {
return nil, false, nil
}
return *geometryFromCanvasPath(result), true, nil
}
// actionCanvasMatrix 转换页面坐标矩阵,不翻转Y轴
// 入参: matrix 页面变换
// 返回: canvas.Matrix 路径变换