feat(转换能力): 修正颜色转换与路径填充
build.yaml / build (push) Successful in 43s

This commit is contained in:
xiaoqidun committed 2026-09-28 20:23:12 +08:00
1 parent 73105646aa
commit 30d9699385
6 files changed
+12 -18

No files matched your search

+3 -3
View File
@@ -52,7 +52,7 @@ func pdfGradientStopsError(stops []pdfgo.GradientStop, space *pdfgo.ColorSpace)
for i := 1; i < len(stops); i++ {
a, b := stops[i-1], stops[i]
if a.Position != b.Position && a.Values != b.Values {
return &pdfgo.UnsupportedError{Feature: "nonlinear ICC gradient conversion"}
return &pdfgo.UnsupportedError{Feature: "nonlinear calibrated gradient conversion"}
}
}
}
@@ -69,7 +69,7 @@ func pdfGradientError(paint pdfgo.Paint) error {
return &pdfgo.UnsupportedError{Feature: "nonlinear mesh conversion"}
}
if mesh.Space.Calibrated() && !mesh.Space.SRGBEquivalent() {
return &pdfgo.UnsupportedError{Feature: "nonlinear ICC mesh conversion"}
return &pdfgo.UnsupportedError{Feature: "nonlinear calibrated mesh conversion"}
}
}
if paint.Axial != nil {
@@ -99,7 +99,7 @@ func (p *pdfImporter) gradientPath(mark pdfgo.PathMark) error {
case paint.Mesh != nil:
space = paint.Mesh.Space
}
if paint.CMYK == nil && (space == nil || space.Model != "DeviceCMYK" || space.Calibrated()) {
if space != nil && space.Calibrated() || paint.CMYK == nil && (space == nil || space.Model != "DeviceCMYK") {
cmyk = false
break
}