feat(渲染能力): 修正渐变色标与外层透明度的叠加计算
build.yaml / build (push) Successful in 37s

This commit is contained in:
xiaoqidun committed 2026-09-09 10:59:00 +08:00
1 parent be125d6436
commit 62456ce44d
1 file changed
+2 -8
+2 -8
View File
@@ -243,10 +243,7 @@ func parseShdColor(segments []ShdSegment, alpha *int) color.Color {
if strings.TrimSpace(segment.Color.Value) == "" {
continue
}
segmentAlpha := alpha
if segmentAlpha == nil {
segmentAlpha = segment.Color.Alpha
}
segmentAlpha := mergeAlpha(segment.Color.Alpha, alpha)
return parseColorWithAlpha(segment.Color.Value, segmentAlpha)
}
return color.Black
@@ -280,10 +277,7 @@ func parseShdSegments(segments []ShdSegment, alpha *int) canvas.Grad {
if strings.TrimSpace(segment.Color.Value) == "" {
continue
}
segmentAlpha := alpha
if segmentAlpha == nil {
segmentAlpha = segment.Color.Alpha
}
segmentAlpha := mergeAlpha(segment.Color.Alpha, alpha)
gradient.Add(offset, colorToRGBA(parseColorWithAlpha(segment.Color.Value, segmentAlpha)))
}
if len(gradient) == 0 {