fix(渲染能力): 修复色彩校验导致的渲染回归
build.yaml / build (push) Successful in 51s

This commit is contained in:
xiaoqidun committed 2026-10-16 14:21:50 +08:00
1 parent 45b9e93041
commit 7a0bbbe8df
1 file changed
+2 -1
+2 -1
View File
@@ -89,7 +89,8 @@ func (r *Renderer) parseColorWithAlpha(value string, index *int, space string, a
// 返回: string 颜色模型, [4]float64 单位分量, error 颜色定义错误
func (r *Renderer) colorComponents(value string, index *int, space string) (string, [4]float64, error) {
cs := r.colorDefinition(space)
if cs == nil && (space != "" || r.Reader != nil && r.Reader.doc != nil && r.Reader.doc.CommonData.DefaultCS != 0) {
defaultSpace := r.Reader != nil && r.Reader.doc != nil && r.Reader.doc.CommonData.DefaultCS != 0
if cs == nil && (defaultSpace || space != "" && (index != nil || len(strings.Fields(value)) != 3)) {
if space == "" {
space = strconv.Itoa(r.Reader.doc.CommonData.DefaultCS)
}