Skip to content

Add mix-blend-mode support to SVG importer.#3334

Merged
shlzxjp merged 3 commits intoTencent:mainfrom
OnionsYu:bugfix/onionsyu_svg_blend_mode
Mar 19, 2026
Merged

Add mix-blend-mode support to SVG importer.#3334
shlzxjp merged 3 commits intoTencent:mainfrom
OnionsYu:bugfix/onionsyu_svg_blend_mode

Conversation

@OnionsYu
Copy link
Contributor

SVG 元素的 mix-blend-mode 属性此前未被解析,导致导入 SVG 文件时图层混合模式始终为 Normal,与原始设计效果不符。

本次修改新增 SVGBlendMode.h,提供 SVG 混合模式字符串与 BlendMode 枚举之间的双向转换,并在 SVGImporter 解析图层属性时读取 mix-blend-mode 并赋值给对应图层的 blendMode 字段。

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.24%. Comparing base (fd66f78) to head (de03ef3).

Files with missing lines Patch % Lines
src/pagx/svg/SVGBlendMode.h 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3334      +/-   ##
==========================================
- Coverage   75.27%   75.24%   -0.03%     
==========================================
  Files         503      504       +1     
  Lines       33414    33422       +8     
  Branches    10668    10673       +5     
==========================================
- Hits        25151    25150       -1     
- Misses       6035     6038       +3     
- Partials     2228     2234       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shlzxjp shlzxjp merged commit 1db9626 into Tencent:main Mar 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants