Browse Source

fix: XML Documentation (#14023)

pull/14089/head
workgroupengineering 3 years ago
committed by GitHub
parent
commit
2385395ed5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 64
      src/Avalonia.Base/Media/StreamGeometryContext.cs
  2. 20
      src/Avalonia.Base/Platform/IGeometryContext.cs
  3. 19
      src/Avalonia.Base/Platform/PathGeometryContext.cs

64
src/Avalonia.Base/Media/StreamGeometryContext.cs

@ -29,22 +29,13 @@ namespace Avalonia.Media
/// Sets path's winding rule (default is EvenOdd). You should call this method before any calls to BeginFigure. If you wonder why, ask Direct2D guys about their design decisions. /// Sets path's winding rule (default is EvenOdd). You should call this method before any calls to BeginFigure. If you wonder why, ask Direct2D guys about their design decisions.
/// </summary> /// </summary>
/// <param name="fillRule"></param> /// <param name="fillRule"></param>
public void SetFillRule(FillRule fillRule) public void SetFillRule(FillRule fillRule)
{ {
_impl.SetFillRule(fillRule); _impl.SetFillRule(fillRule);
} }
/// <summary>
/// Draws an arc to the specified point. /// <inheritdoc/>
/// </summary>
/// <param name="point">The destination point.</param>
/// <param name="size">The radii of an oval whose perimeter is used to draw the angle.</param>
/// <param name="rotationAngle">The rotation angle (in radians) of the oval that specifies the curve.</param>
/// <param name="isLargeArc">true to draw the arc greater than 180 degrees; otherwise, false.</param>
/// <param name="sweepDirection">
/// A value that indicates whether the arc is drawn in the Clockwise or Counterclockwise direction.
/// </param>
public void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection) public void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection)
{ {
_impl.ArcTo(point, size, rotationAngle, isLargeArc, sweepDirection); _impl.ArcTo(point, size, rotationAngle, isLargeArc, sweepDirection);
@ -54,8 +45,8 @@ namespace Avalonia.Media
/// <summary> /// <summary>
/// Draws an arc to the specified point using polylines, quadratic or cubic Bezier curves /// Draws an arc to the specified point using polylines, quadratic or cubic Bezier curves
/// Significantly more precise when drawing elliptic arcs with extreme width:height ratios. /// Significantly more precise when drawing elliptic arcs with extreme width:height ratios.
/// </summary> /// </summary>
/// <param name="point">The destination point.</param> /// <param name="point">The destination point.</param>
/// <param name="size">The radii of an oval whose perimeter is used to draw the angle.</param> /// <param name="size">The radii of an oval whose perimeter is used to draw the angle.</param>
/// <param name="rotationAngle">The rotation angle (in radians) of the oval that specifies the curve.</param> /// <param name="rotationAngle">The rotation angle (in radians) of the oval that specifies the curve.</param>
@ -68,54 +59,37 @@ namespace Avalonia.Media
PreciseEllipticArcHelper.ArcTo(this, _currentPoint, point, size, rotationAngle, isLargeArc, sweepDirection); PreciseEllipticArcHelper.ArcTo(this, _currentPoint, point, size, rotationAngle, isLargeArc, sweepDirection);
} }
/// <summary>
/// Begins a new figure. /// <inheritdoc/>
/// </summary>
/// <param name="startPoint">The starting point for the figure.</param>
/// <param name="isFilled">Whether the figure is filled.</param>
public void BeginFigure(Point startPoint, bool isFilled) public void BeginFigure(Point startPoint, bool isFilled)
{ {
_impl.BeginFigure(startPoint, isFilled); _impl.BeginFigure(startPoint, isFilled);
_currentPoint = startPoint; _currentPoint = startPoint;
} }
/// <summary> /// <inheritdoc/>
/// Draws a Bezier curve to the specified point. public void CubicBezierTo(Point controlPoint1, Point controlPoint2, Point endPoint)
/// </summary>
/// <param name="point1">The first control point used to specify the shape of the curve.</param>
/// <param name="point2">The second control point used to specify the shape of the curve.</param>
/// <param name="point3">The destination point for the end of the curve.</param>
public void CubicBezierTo(Point point1, Point point2, Point point3)
{ {
_impl.CubicBezierTo(point1, point2, point3); _impl.CubicBezierTo(controlPoint1, controlPoint2, endPoint);
_currentPoint = point3; _currentPoint = endPoint;
} }
/// <summary> /// <inheritdoc/>
/// Draws a quadratic Bezier curve to the specified point public void QuadraticBezierTo(Point controlPoint , Point endPoint)
/// </summary>
/// <param name="control">The control point used to specify the shape of the curve.</param>
/// <param name="endPoint">The destination point for the end of the curve.</param>
public void QuadraticBezierTo(Point control, Point endPoint)
{ {
_impl.QuadraticBezierTo(control, endPoint); _impl.QuadraticBezierTo(controlPoint , endPoint);
_currentPoint = endPoint; _currentPoint = endPoint;
} }
/// <summary>
/// Draws a line to the specified point. /// <inheritdoc/>
/// </summary> public void LineTo(Point endPoint)
/// <param name="point">The destination point.</param>
public void LineTo(Point point)
{ {
_impl.LineTo(point); _impl.LineTo(endPoint);
_currentPoint = point; _currentPoint = endPoint;
} }
/// <summary> /// <inheritdoc/>
/// Ends the figure started by <see cref="BeginFigure(Point, bool)"/>.
/// </summary>
/// <param name="isClosed">Whether the figure is closed.</param>
public void EndFigure(bool isClosed) public void EndFigure(bool isClosed)
{ {
_impl.EndFigure(isClosed); _impl.EndFigure(isClosed);

20
src/Avalonia.Base/Platform/IGeometryContext.cs

@ -30,23 +30,23 @@ namespace Avalonia.Platform
/// <summary> /// <summary>
/// Draws a Bezier curve to the specified point. /// Draws a Bezier curve to the specified point.
/// </summary> /// </summary>
/// <param name="point1">The first control point used to specify the shape of the curve.</param> /// <param name="controlPoint1">The first control point used to specify the shape of the curve.</param>
/// <param name="point2">The second control point used to specify the shape of the curve.</param> /// <param name="controlPoint2">The second control point used to specify the shape of the curve.</param>
/// <param name="point3">The destination point for the end of the curve.</param> /// <param name="endPoint">The destination point for the end of the curve.</param>
void CubicBezierTo(Point point1, Point point2, Point point3); void CubicBezierTo(Point controlPoint1, Point controlPoint2, Point endPoint);
/// <summary> /// <summary>
/// Draws a quadratic Bezier curve to the specified point /// Draws a quadratic Bezier curve to the specified point
/// </summary> /// </summary>
/// <param name="control">Control point</param> /// <param name="controlPoint ">Control point</param>
/// <param name="endPoint">DestinationPoint</param> /// <param name="endPoint">DestinationPoint</param>
void QuadraticBezierTo(Point control, Point endPoint); void QuadraticBezierTo(Point controlPoint , Point endPoint);
/// <summary> /// <summary>
/// Draws a line to the specified point. /// Draws a line to the specified point.
/// </summary> /// </summary>
/// <param name="point">The destination point.</param> /// <param name="endPoint">The destination point.</param>
void LineTo(Point point); void LineTo(Point endPoint);
/// <summary> /// <summary>
/// Ends the figure started by <see cref="BeginFigure(Point, bool)"/>. /// Ends the figure started by <see cref="BeginFigure(Point, bool)"/>.
@ -55,9 +55,9 @@ namespace Avalonia.Platform
void EndFigure(bool isClosed); void EndFigure(bool isClosed);
/// <summary> /// <summary>
/// Sets the fill rule. /// Sets path's winding rule (default is EvenOdd). You should call this method before any calls to BeginFigure.
/// </summary> /// </summary>
/// <param name="fillRule">The fill rule.</param> /// <param name="fillRule"></param>
void SetFillRule(FillRule fillRule); void SetFillRule(FillRule fillRule);
} }
} }

19
src/Avalonia.Base/Platform/PathGeometryContext.cs

@ -20,6 +20,7 @@ namespace Avalonia.Visuals.Platform
_pathGeometry = null; _pathGeometry = null;
} }
/// <inheritdoc/>
public void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection) public void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection)
{ {
var arcSegment = new ArcSegment var arcSegment = new ArcSegment
@ -34,6 +35,7 @@ namespace Avalonia.Visuals.Platform
CurrentFigureSegments().Add(arcSegment); CurrentFigureSegments().Add(arcSegment);
} }
/// <inheritdoc/>
public void BeginFigure(Point startPoint, bool isFilled) public void BeginFigure(Point startPoint, bool isFilled)
{ {
ThrowIfDisposed(); ThrowIfDisposed();
@ -44,30 +46,34 @@ namespace Avalonia.Visuals.Platform
_pathGeometry.Figures.Add(_currentFigure); _pathGeometry.Figures.Add(_currentFigure);
} }
public void CubicBezierTo(Point point1, Point point2, Point point3) /// <inheritdoc/>
public void CubicBezierTo(Point controlPoint1, Point controlPoint2, Point endPoint)
{ {
var bezierSegment = new BezierSegment { Point1 = point1, Point2 = point2, Point3 = point3 }; var bezierSegment = new BezierSegment { Point1 = controlPoint1, Point2 = controlPoint2, Point3 = endPoint };
CurrentFigureSegments().Add(bezierSegment); CurrentFigureSegments().Add(bezierSegment);
} }
public void QuadraticBezierTo(Point control, Point endPoint) /// <inheritdoc/>
public void QuadraticBezierTo(Point controlPoint , Point endPoint)
{ {
var quadraticBezierSegment = new QuadraticBezierSegment { Point1 = control, Point2 = endPoint }; var quadraticBezierSegment = new QuadraticBezierSegment { Point1 = controlPoint , Point2 = endPoint };
CurrentFigureSegments().Add(quadraticBezierSegment); CurrentFigureSegments().Add(quadraticBezierSegment);
} }
public void LineTo(Point point) /// <inheritdoc/>
public void LineTo(Point endPoint)
{ {
var lineSegment = new LineSegment var lineSegment = new LineSegment
{ {
Point = point Point = endPoint
}; };
CurrentFigureSegments().Add(lineSegment); CurrentFigureSegments().Add(lineSegment);
} }
/// <inheritdoc/>
public void EndFigure(bool isClosed) public void EndFigure(bool isClosed)
{ {
if (_currentFigure != null) if (_currentFigure != null)
@ -78,6 +84,7 @@ namespace Avalonia.Visuals.Platform
_currentFigure = null; _currentFigure = null;
} }
/// <inheritdoc/>
public void SetFillRule(FillRule fillRule) public void SetFillRule(FillRule fillRule)
{ {
ThrowIfDisposed(); ThrowIfDisposed();

Loading…
Cancel
Save