Browse Source

fix: XML Documentation (#14023)

pull/14089/head
workgroupengineering 2 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.
/// </summary>
/// <param name="fillRule"></param>
public void SetFillRule(FillRule fillRule)
{
_impl.SetFillRule(fillRule);
}
/// <summary>
/// Draws an arc to the specified point.
/// </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>
/// <inheritdoc/>
public void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection)
{
_impl.ArcTo(point, size, rotationAngle, isLargeArc, sweepDirection);
@ -54,8 +45,8 @@ namespace Avalonia.Media
/// <summary>
/// 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.
/// </summary>
/// Significantly more precise when drawing elliptic arcs with extreme width:height ratios.
/// </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>
@ -68,54 +59,37 @@ namespace Avalonia.Media
PreciseEllipticArcHelper.ArcTo(this, _currentPoint, point, size, rotationAngle, isLargeArc, sweepDirection);
}
/// <summary>
/// Begins a new figure.
/// </summary>
/// <param name="startPoint">The starting point for the figure.</param>
/// <param name="isFilled">Whether the figure is filled.</param>
/// <inheritdoc/>
public void BeginFigure(Point startPoint, bool isFilled)
{
_impl.BeginFigure(startPoint, isFilled);
_currentPoint = startPoint;
}
/// <summary>
/// Draws a Bezier curve to the specified point.
/// </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)
/// <inheritdoc/>
public void CubicBezierTo(Point controlPoint1, Point controlPoint2, Point endPoint)
{
_impl.CubicBezierTo(point1, point2, point3);
_currentPoint = point3;
_impl.CubicBezierTo(controlPoint1, controlPoint2, endPoint);
_currentPoint = endPoint;
}
/// <summary>
/// Draws a quadratic Bezier curve to the specified point
/// </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)
/// <inheritdoc/>
public void QuadraticBezierTo(Point controlPoint , Point endPoint)
{
_impl.QuadraticBezierTo(control, endPoint);
_impl.QuadraticBezierTo(controlPoint , endPoint);
_currentPoint = endPoint;
}
/// <summary>
/// Draws a line to the specified point.
/// </summary>
/// <param name="point">The destination point.</param>
public void LineTo(Point point)
/// <inheritdoc/>
public void LineTo(Point endPoint)
{
_impl.LineTo(point);
_currentPoint = point;
_impl.LineTo(endPoint);
_currentPoint = endPoint;
}
/// <summary>
/// Ends the figure started by <see cref="BeginFigure(Point, bool)"/>.
/// </summary>
/// <param name="isClosed">Whether the figure is closed.</param>
/// <inheritdoc/>
public void EndFigure(bool isClosed)
{
_impl.EndFigure(isClosed);

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

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

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

@ -20,6 +20,7 @@ namespace Avalonia.Visuals.Platform
_pathGeometry = null;
}
/// <inheritdoc/>
public void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection)
{
var arcSegment = new ArcSegment
@ -34,6 +35,7 @@ namespace Avalonia.Visuals.Platform
CurrentFigureSegments().Add(arcSegment);
}
/// <inheritdoc/>
public void BeginFigure(Point startPoint, bool isFilled)
{
ThrowIfDisposed();
@ -44,30 +46,34 @@ namespace Avalonia.Visuals.Platform
_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);
}
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);
}
public void LineTo(Point point)
/// <inheritdoc/>
public void LineTo(Point endPoint)
{
var lineSegment = new LineSegment
{
Point = point
Point = endPoint
};
CurrentFigureSegments().Add(lineSegment);
}
/// <inheritdoc/>
public void EndFigure(bool isClosed)
{
if (_currentFigure != null)
@ -78,6 +84,7 @@ namespace Avalonia.Visuals.Platform
_currentFigure = null;
}
/// <inheritdoc/>
public void SetFillRule(FillRule fillRule)
{
ThrowIfDisposed();

Loading…
Cancel
Save