microsoft / microsoft/microsoft-ui-xaml

Changing the StartPoint property of PathFigure does not cause the figure to recalculate the drawing area

Open
#10,614 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Shapes bug team-Rendering
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

Describe the bug

I created a path to link my uielements, but when I tried to change StartPoint property, the line breaked at the former X-Y boundary, but when I changed the Point porperty of LineSegment, everything worked well.

before draging
Image

after draging
Image

Steps to reproduce the bug
  1. Create a path as followed and add it to page.
    Path path = new();
    PathGeometry _pathGeometry = new();
    PathFigure _pathFigure = new();
    LineSegment _bezierSegment = new();
    _pathFigure.StartPoint = new(X, Y);
    _pathFigure.IsClosed = false;
    _pathFigure.Segments.Add(_bezierSegment);
    _pathGeometry.Figures.Add(_pathFigure);
    path.Data = _pathGeometry;
  1. change StartPoint property of PathFigure and Point property of LineSegment respectively. When startpoint changes out of the former drawing area, the boundary doesn't expand.
    _pathFigure.StartPoint = new(X, Y);
    _bezierSegment.Point = new(X, Y);
Expected behavior

No response

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the PathFigure.StartPoint property and compare its drawing-area update behavior with LineSegment.Point, using the reproduction code in the issue. Trace how changing each property affects the path bounds; done means moving StartPoint beyond the former bounds expands the rendered drawing area without leaving the line clipped.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.