Skip to content

fix(core): normalize signed Rect border bounds - #2105

Merged
xuefei1313 merged 3 commits into
developfrom
fix/rect-negative-size-outer-border
Jul 28, 2026
Merged

fix(core): normalize signed Rect border bounds#2105
xuefei1313 merged 3 commits into
developfrom
fix/rect-negative-size-outer-border

Conversation

@xuefei1313

Copy link
Copy Markdown
Contributor

Summary

  • Normalize Rect outer/inner border geometry from signed dimensions to physical bounds.
  • Resolve x1/y1 fallback dimensions in attribute space while positioning paths from renderer-local coordinates.
  • Add regressions for negative width, small rectangles, dx offsets, and non-degenerate inner borders.

Root cause

The border contribution assumed positive dimensions. For an x/x1 Rect with negative width, an outer-border expansion could invert the width and draw inside the physical bar. Its x1/y1 fallback also mixed attribute-space endpoints with renderer-local draw coordinates when offsets were applied.

Validation

  • rushx test --runInBand in packages/vrender-core — 613 passed, 3 skipped.
  • rush compile -t @visactor/vrender-core.
  • Pre-push rush test --only tag:package — 7 related packages passed (existing warnings only).

@xuefei1313
xuefei1313 marked this pull request as ready for review July 28, 2026 11:26
@xuefei1313
xuefei1313 merged commit cd83054 into develop Jul 28, 2026
4 of 7 checks passed
@xuefei1313
xuefei1313 deleted the fix/rect-negative-size-outer-border branch July 28, 2026 12:04
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