Skip to content

Rename center attribute to position for Rectangle, Ellipse, and Polystar.#3319

Merged
domchen merged 11 commits intomainfrom
feature/dom_rename_center_to_position
Mar 13, 2026
Merged

Rename center attribute to position for Rectangle, Ellipse, and Polystar.#3319
domchen merged 11 commits intomainfrom
feature/dom_rename_center_to_position

Conversation

@domchen
Copy link
Collaborator

@domchen domchen commented Mar 13, 2026

将 PAGX 格式中 Rectangle、Ellipse、Polystar 三个 VectorElement 的 center 属性重命名为 position,涉及 C++ 代码(导入/导出/渲染/CLI 工具)、规范文档(中英文)、skills 参考文档、测试用例及约 90 个 .pagx 资源文件。Gradient 的 center 属性保持不变。

domchen added 6 commits March 13, 2026 09:53
Align with the auto-layout design specification: VectorElements (Rectangle, Ellipse, Polystar) and Gradient nodes use unified 'position' attribute to represent anchor point coordinates. This avoids confusion with layout constraint properties (centerX/centerY).
Revert center to position changes for RadialGradient, ConicGradient, and DiamondGradient (only VectorElements should be renamed). Add missing documentation updates to skills files.
Change Rectangle/Ellipse/Polystar attribute names from 'center' to 'position' in the attribute ordering map and update related documentation comments for consistency.
@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 83.56164% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.88%. Comparing base (ba624e1) to head (24dbc38).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/cli/CommandOptimize.cpp 82.85% 6 Missing ⚠️
src/pagx/PAGXExporter.cpp 33.33% 1 Missing and 3 partials ⚠️
src/pagx/svg/SVGImporter.cpp 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3319      +/-   ##
==========================================
+ Coverage   74.82%   74.88%   +0.05%     
==========================================
  Files         503      503              
  Lines       32978    32980       +2     
  Branches    10775    10777       +2     
==========================================
+ Hits        24677    24696      +19     
+ Misses       6089     6085       -4     
+ Partials     2212     2199      -13     

☔ 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.

@domchen domchen merged commit c3d40c6 into main Mar 13, 2026
9 checks passed
@domchen domchen deleted the feature/dom_rename_center_to_position branch March 13, 2026 08:41
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.

2 participants