refactor(重构提升): 修复裁剪并优化转换渲染
build.yaml / build (push) Successful in 47s

This commit is contained in:
xiaoqidun committed 2026-10-06 23:09:49 +08:00
1 parent 619899e297
commit e8344e6387
27 files changed
+754 -150

No files matched your search

+9
View File
@@ -214,5 +214,14 @@ func clipGeometry(geometry GeometryBackend, path GeometryPath, clip *GeometryPat
return path, nil
}
}
if rect, ok := geometryRectangleBounds(path); ok {
bounds, err := geometry.Bounds(*clip)
if err != nil {
return nil, err
}
if bounds.X >= rect.X && bounds.Y >= rect.Y && bounds.X+bounds.W <= rect.X+rect.W && bounds.Y+bounds.H <= rect.Y+rect.H {
return *clip, nil
}
}
return geometry.Combine(path, *clip, GeometryIntersect)
}