feat(转换渲染): 完善转换能力与图像渲染
build.yaml / build (push) Successful in 44s

This commit is contained in:
xiaoqidun committed 2026-09-27 19:28:58 +08:00
1 parent 052e34a4e6
commit 1739303f5e
17 files changed
+658 -130

No files matched your search

+7 -1
View File
@@ -64,7 +64,13 @@ func pdfGradientStopsError(stops []pdfgo.GradientStop, space *pdfgo.ColorSpace)
// 返回: error 不可等价表达的渐变
func pdfGradientError(paint pdfgo.Paint) error {
if paint.Mesh != nil {
return &pdfgo.UnsupportedError{Feature: "bicubic mesh conversion"}
mesh := paint.Mesh
if len(mesh.Patches) != 0 || len(mesh.Triangles) == 0 || mesh.UsesFunction() {
return &pdfgo.UnsupportedError{Feature: "nonlinear mesh conversion"}
}
if mesh.Space.Calibrated() && !mesh.Space.SRGBEquivalent() {
return &pdfgo.UnsupportedError{Feature: "nonlinear ICC mesh conversion"}
}
}
if paint.Axial != nil {
return pdfGradientStopsError(paint.Axial.Stops, paint.Axial.Space)