mirror of
https://github.com/osukey/osukey.git
synced 2025-07-07 11:19:54 +09:00
Correct 4+ point perfect curves to Bezier
This commit is contained in:
@ -213,10 +213,13 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
if (ControlPoint.Type.Value != PathType.PerfectCurve)
|
if (ControlPoint.Type.Value != PathType.PerfectCurve)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ReadOnlySpan<Vector2> points = PointsInSegment.Select(p => p.Position.Value).ToArray();
|
if (PointsInSegment.Count > 3)
|
||||||
if (points.Length != 3)
|
ControlPoint.Type.Value = PathType.Bezier;
|
||||||
|
|
||||||
|
if (PointsInSegment.Count != 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ReadOnlySpan<Vector2> points = PointsInSegment.Select(p => p.Position.Value).ToArray();
|
||||||
RectangleF boundingBox = PathApproximator.CircularArcBoundingBox(points);
|
RectangleF boundingBox = PathApproximator.CircularArcBoundingBox(points);
|
||||||
if (boundingBox.Width >= 640 || boundingBox.Height >= 480)
|
if (boundingBox.Width >= 640 || boundingBox.Height >= 480)
|
||||||
ControlPoint.Type.Value = PathType.Bezier;
|
ControlPoint.Type.Value = PathType.Bezier;
|
||||||
|
Reference in New Issue
Block a user