Skip to content

Commit

Permalink
Merge pull request #325 from Lehonti/improvement8
Browse files Browse the repository at this point in the history
File-scoped namespace in `ControlPoint.cs`
  • Loading branch information
cameronwhite authored Aug 10, 2023
2 parents 16eef92 + 2ec5445 commit 8ced3f6
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions Pinta.Tools/Editable/Shapes/ControlPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,27 @@

using Pinta.Core;

namespace Pinta.Tools
namespace Pinta.Tools;

public sealed class ControlPoint
{
public class ControlPoint
{
//Note: not using get/set because this is used in time-critical code that is sped up without it.
public PointD Position;
public double Tension;
//Note: not using get/set because this is used in time-critical code that is sped up without it.
public PointD Position;
public double Tension;

/// <summary>
/// A wrapper class for a PointD with its own tension value.
/// </summary>
/// <param name="passedPosition">The position of the PointD on the Canvas.</param>
/// <param name="passedTension">The tension of the ControlPoint on the shape.</param>
public ControlPoint (PointD passedPosition, double passedTension)
{
Position = passedPosition;
Tension = passedTension;
}
/// <summary>
/// A wrapper class for a PointD with its own tension value.
/// </summary>
/// <param name="passedPosition">The position of the PointD on the Canvas.</param>
/// <param name="passedTension">The tension of the ControlPoint on the shape.</param>
public ControlPoint (PointD passedPosition, double passedTension)
{
Position = passedPosition;
Tension = passedTension;
}

public ControlPoint Clone ()
{
return new ControlPoint (Position, Tension);
}
public ControlPoint Clone ()
{
return new ControlPoint (Position, Tension);
}
}

0 comments on commit 8ced3f6

Please sign in to comment.