Automated dotnet-format update
This commit is contained in:
1 parent
ad4c2f68aa
commit
2af18c2d38
403 files changed
+1569
-1567
No files matched your search
@@ -354,4 +354,4 @@ namespace HandyControl.Expression.Drawing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,4 +112,4 @@ namespace HandyControl.Expression.Drawing
|
||||
list.RemoveAt(list.Count - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,4 +36,4 @@ namespace HandyControl.Expression.Drawing
|
||||
internal static string TypeNotSupported =>
|
||||
ResourceManager.GetString("TypeNotSupported", Culture);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -218,4 +218,4 @@ namespace HandyControl.Expression.Drawing
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,4 +47,4 @@ namespace HandyControl.Expression.Drawing
|
||||
return GeometryHelper.Lerp(points[Index], points[Index + 1], Ratio);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,4 +6,4 @@
|
||||
CompletePolyline,
|
||||
CornerPoint
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,4 +66,4 @@ namespace HandyControl.Expression.Drawing
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,4 +112,4 @@ namespace HandyControl.Expression.Drawing
|
||||
return flag | figure.SetIfDifferent(PathFigure.IsFilledProperty, isFilled);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,4 +22,4 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
internal static Geometry FixPathGeometryBoundary(Geometry geometry) => geometry;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,4 +14,4 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
public Point StartPoint { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -243,7 +243,7 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
public static PathSegmentImplementation Create(ArcSegment source)
|
||||
{
|
||||
if (source != null) return new ArcSegmentImplementation {_segment = source};
|
||||
if (source != null) return new ArcSegmentImplementation { _segment = source };
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -454,13 +454,13 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
public static PathSegmentImplementation Create(BezierSegment source)
|
||||
{
|
||||
if (source != null) return new BezierSegmentImplementation {_segment = source};
|
||||
if (source != null) return new BezierSegmentImplementation { _segment = source };
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void Flatten(IList<Point> points, double tolerance)
|
||||
{
|
||||
Point[] controlPoints = {Start, _segment.Point1, _segment.Point2, _segment.Point3};
|
||||
Point[] controlPoints = { Start, _segment.Point1, _segment.Point2, _segment.Point3 };
|
||||
var resultPolyline = new List<Point>();
|
||||
BezierCurveFlattener.FlattenCubic(controlPoints, tolerance, resultPolyline, true);
|
||||
points.AddRange(resultPolyline);
|
||||
@@ -493,7 +493,7 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
public static PathSegmentImplementation Create(LineSegment source)
|
||||
{
|
||||
if (source != null) return new LineSegmentImplementation {_segment = source};
|
||||
if (source != null) return new LineSegmentImplementation { _segment = source };
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ namespace HandyControl.Expression.Drawing
|
||||
PolyQuadraticBezierSegmentImplementation.Create(segment as PolyQuadraticBezierSegment)
|
||||
) == null)
|
||||
throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture,
|
||||
ExceptionStringTable.TypeNotSupported, new object[] {segment.GetType().FullName}));
|
||||
ExceptionStringTable.TypeNotSupported, new object[] { segment.GetType().FullName }));
|
||||
return implementation;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
public static PathSegmentImplementation Create(PolyBezierSegment source)
|
||||
{
|
||||
if (source != null) return new PolyBezierSegmentImplementation {_segment = source};
|
||||
if (source != null) return new PolyBezierSegmentImplementation { _segment = source };
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ namespace HandyControl.Expression.Drawing
|
||||
var num = _segment.Points.Count / 3 * 3;
|
||||
for (var i = 0; i < num; i += 3)
|
||||
{
|
||||
Point[] controlPoints = {start, _segment.Points[i], _segment.Points[i + 1], _segment.Points[i + 2]};
|
||||
Point[] controlPoints = { start, _segment.Points[i], _segment.Points[i + 1], _segment.Points[i + 2] };
|
||||
var resultPolyline = new List<Point>();
|
||||
BezierCurveFlattener.FlattenCubic(controlPoints, tolerance, resultPolyline, true);
|
||||
points.AddRange(resultPolyline);
|
||||
@@ -626,7 +626,7 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
public static PathSegmentImplementation Create(PolyLineSegment source)
|
||||
{
|
||||
if (source != null) return new PolyLineSegmentImplementation {_segment = source};
|
||||
if (source != null) return new PolyLineSegmentImplementation { _segment = source };
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -670,7 +670,7 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
public static PathSegmentImplementation Create(PolyQuadraticBezierSegment source)
|
||||
{
|
||||
if (source != null) return new PolyQuadraticBezierSegmentImplementation {_segment = source};
|
||||
if (source != null) return new PolyQuadraticBezierSegmentImplementation { _segment = source };
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ namespace HandyControl.Expression.Drawing
|
||||
var num = _segment.Points.Count / 2 * 2;
|
||||
for (var i = 0; i < num; i += 2)
|
||||
{
|
||||
Point[] controlPoints = {start, _segment.Points[i], _segment.Points[i + 1]};
|
||||
Point[] controlPoints = { start, _segment.Points[i], _segment.Points[i + 1] };
|
||||
var resultPolyline = new List<Point>();
|
||||
BezierCurveFlattener.FlattenQuadratic(controlPoints, tolerance, resultPolyline, true);
|
||||
points.AddRange(resultPolyline);
|
||||
@@ -728,13 +728,13 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
public static PathSegmentImplementation Create(QuadraticBezierSegment source)
|
||||
{
|
||||
if (source != null) return new QuadraticBezierSegmentImplementation {_segment = source};
|
||||
if (source != null) return new QuadraticBezierSegmentImplementation { _segment = source };
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void Flatten(IList<Point> points, double tolerance)
|
||||
{
|
||||
Point[] controlPoints = {Start, _segment.Point1, _segment.Point2};
|
||||
Point[] controlPoints = { Start, _segment.Point1, _segment.Point2 };
|
||||
var resultPolyline = new List<Point>();
|
||||
BezierCurveFlattener.FlattenQuadratic(controlPoints, tolerance, resultPolyline, true);
|
||||
points.AddRange(resultPolyline);
|
||||
@@ -752,4 +752,4 @@ namespace HandyControl.Expression.Drawing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,4 +149,4 @@ namespace HandyControl.Expression.Drawing
|
||||
return Normals[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,4 +113,4 @@ namespace HandyControl.Expression.Drawing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,4 +42,4 @@ namespace HandyControl.Expression.Drawing
|
||||
|
||||
private double Uniform() => _random.NextDouble();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace HandyControl.Expression.Drawing
|
||||
var segment = new SimpleSegment
|
||||
{
|
||||
Type = SegmentType.Line,
|
||||
Points = new[] {point0, point1}
|
||||
Points = new[] { point0, point1 }
|
||||
};
|
||||
return segment;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace HandyControl.Expression.Drawing
|
||||
var segment = new SimpleSegment
|
||||
{
|
||||
Type = SegmentType.CubicBeizer,
|
||||
Points = new[] {point0, point, point3, point2}
|
||||
Points = new[] { point0, point, point3, point2 }
|
||||
};
|
||||
return segment;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ namespace HandyControl.Expression.Drawing
|
||||
var segment = new SimpleSegment
|
||||
{
|
||||
Type = SegmentType.CubicBeizer,
|
||||
Points = new[] {point0, point1, point2, point3}
|
||||
Points = new[] { point0, point1, point2, point3 }
|
||||
};
|
||||
return segment;
|
||||
}
|
||||
@@ -73,4 +73,4 @@ namespace HandyControl.Expression.Drawing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,7 +339,7 @@ namespace HandyControl.Expression.Media
|
||||
figure = new PathFigure();
|
||||
CachedGeometry = new PathGeometry
|
||||
{
|
||||
Figures = {figure}
|
||||
Figures = { figure }
|
||||
};
|
||||
figure.Segments.Add(segment = new ArcSegment());
|
||||
figure.IsClosed = false;
|
||||
@@ -371,7 +371,7 @@ namespace HandyControl.Expression.Media
|
||||
figure = new PathFigure();
|
||||
CachedGeometry = new PathGeometry
|
||||
{
|
||||
Figures = {figure}
|
||||
Figures = { figure }
|
||||
};
|
||||
figure.Segments.Add(segment = new ArcSegment());
|
||||
figure.Segments.Add(segment2 = new LineSegment());
|
||||
@@ -467,4 +467,4 @@ namespace HandyControl.Expression.Media
|
||||
return flag | geometry.SetIfDifferent(LineGeometry.EndPointProperty, point2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,4 +8,4 @@ namespace HandyControl.Expression.Media
|
||||
|
||||
public DrawingPropertyMetadata Metadata { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,8 @@ namespace HandyControl.Expression.Media
|
||||
|
||||
static DrawingPropertyMetadata()
|
||||
{
|
||||
DrawingPropertyChanged += delegate (object sender, DrawingPropertyChangedEventArgs args) {
|
||||
DrawingPropertyChanged += delegate (object sender, DrawingPropertyChangedEventArgs args)
|
||||
{
|
||||
if ((sender is IShape shape) && args.Metadata.AffectsRender)
|
||||
{
|
||||
InvalidateGeometryReasons reasons = InvalidateGeometryReasons.PropertyChanged;
|
||||
@@ -36,7 +37,7 @@ namespace HandyControl.Expression.Media
|
||||
{
|
||||
}
|
||||
|
||||
private DrawingPropertyMetadata(DrawingPropertyMetadataOptions options, object defaultValue) : base(defaultValue, (FrameworkPropertyMetadataOptions)options)
|
||||
private DrawingPropertyMetadata(DrawingPropertyMetadataOptions options, object defaultValue) : base(defaultValue, (FrameworkPropertyMetadataOptions) options)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -44,7 +45,7 @@ namespace HandyControl.Expression.Media
|
||||
{
|
||||
}
|
||||
|
||||
public DrawingPropertyMetadata(object defaultValue, DrawingPropertyMetadataOptions options, PropertyChangedCallback propertyChangedCallback) : base(defaultValue, (FrameworkPropertyMetadataOptions)options, AttachCallback(defaultValue, options, propertyChangedCallback))
|
||||
public DrawingPropertyMetadata(object defaultValue, DrawingPropertyMetadataOptions options, PropertyChangedCallback propertyChangedCallback) : base(defaultValue, (FrameworkPropertyMetadataOptions) options, AttachCallback(defaultValue, options, propertyChangedCallback))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -73,4 +74,4 @@ namespace HandyControl.Expression.Media
|
||||
propertyChangedCallback?.Invoke(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,4 +9,4 @@ namespace HandyControl.Expression.Media
|
||||
AffectsRender = 0x10,
|
||||
None = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace HandyControl.Expression.Media
|
||||
static GeometryEffect()
|
||||
{
|
||||
DrawingPropertyMetadata.DrawingPropertyChanged +=
|
||||
delegate(object sender, DrawingPropertyChangedEventArgs args)
|
||||
delegate (object sender, DrawingPropertyChangedEventArgs args)
|
||||
{
|
||||
if (sender is GeometryEffect effect && args.Metadata.AffectsRender)
|
||||
effect.InvalidateGeometry(InvalidateGeometryReasons.PropertyChanged);
|
||||
@@ -169,4 +169,4 @@ namespace HandyControl.Expression.Media
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,4 +56,4 @@ namespace HandyControl.Expression.Media
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,4 +85,4 @@ namespace HandyControl.Expression.Media
|
||||
|
||||
protected abstract bool UpdateCachedGeometry(TParameters parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
double StartAngle { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,4 +14,4 @@ namespace HandyControl.Expression.Media
|
||||
|
||||
Rect LogicalBounds { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,4 +28,4 @@ namespace HandyControl.Expression.Media
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,4 +10,4 @@ namespace HandyControl.Expression.Media
|
||||
|
||||
double StrokeThickness { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,4 +22,4 @@ namespace HandyControl.Expression.Media
|
||||
|
||||
double StrokeThickness { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,4 @@ namespace HandyControl.Expression.Media
|
||||
PropertyChanged = 1,
|
||||
TemplateChanged = 0x10
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,12 +45,12 @@ namespace HandyControl.Expression.Media
|
||||
{
|
||||
var startPoint = pathFigure.StartPoint;
|
||||
foreach (var iteratorVariable1 in pathFigure.AllSegments())
|
||||
foreach (var iteratorVariable2 in iteratorVariable1.PathSegment.GetSimpleSegments(
|
||||
iteratorVariable1.StartPoint))
|
||||
{
|
||||
yield return iteratorVariable2;
|
||||
startPoint = iteratorVariable2.Points.Last();
|
||||
}
|
||||
foreach (var iteratorVariable2 in iteratorVariable1.PathSegment.GetSimpleSegments(
|
||||
iteratorVariable1.StartPoint))
|
||||
{
|
||||
yield return iteratorVariable2;
|
||||
startPoint = iteratorVariable2.Points.Last();
|
||||
}
|
||||
|
||||
if (pathFigure.IsClosed) yield return SimpleSegment.Create(startPoint, pathFigure.StartPoint);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ namespace HandyControl.Expression.Media
|
||||
var samplePoints = new List<Point>(sampleCount);
|
||||
var sampleNormals = new List<Vector>(sampleCount);
|
||||
var sampleIndex = 0;
|
||||
PolylineHelper.PathMarch(polyline, 0.0, 0.0, delegate(MarchLocation location)
|
||||
PolylineHelper.PathMarch(polyline, 0.0, 0.0, delegate (MarchLocation location)
|
||||
{
|
||||
if (location.Reason == MarchStopReason.CompletePolyline) return double.NaN;
|
||||
if (location.Reason != MarchStopReason.CompleteStep) return location.Remain;
|
||||
@@ -132,4 +132,4 @@ namespace HandyControl.Expression.Media
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,4 +5,4 @@
|
||||
Pixel,
|
||||
Percent
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,4 +57,4 @@ namespace HandyControl.Expression.Shapes
|
||||
return new ArcGeometrySource();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,4 +77,4 @@ namespace HandyControl.Expression.Shapes
|
||||
|
||||
private void RealizeGeometry() => RenderedGeometryChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user