Browse Source

fix stylecop issues

af/merge-core
Scott Williams 10 years ago
parent
commit
18d87956dc
  1. 1
      src/ImageSharp/Drawing/Paths/InternalPath.cs
  2. 15
      src/ImageSharp/Drawing/Shapes/ComplexPolygon.cs
  3. 3
      src/ImageSharp/Drawing/Shapes/Polygon.cs

1
src/ImageSharp/Drawing/Paths/InternalPath.cs

@ -74,7 +74,6 @@ namespace ImageSharp.Drawing.Paths
{ {
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="InternalPath" /> class. /// Initializes a new instance of the <see cref="InternalPath" /> class.
/// </summary> /// </summary>

15
src/ImageSharp/Drawing/Shapes/ComplexPolygon.cs

@ -94,7 +94,8 @@ namespace ImageSharp.Drawing.Shapes
} }
} }
if (inside) { if (inside)
{
return -dist; return -dist;
} }
@ -154,7 +155,6 @@ namespace ImageSharp.Drawing.Shapes
} }
} }
private void ExtractOutlines(ClipperLib.PolyNode tree, List<IShape> shapes) private void ExtractOutlines(ClipperLib.PolyNode tree, List<IShape> shapes)
{ {
if (tree.Contour.Any()) if (tree.Contour.Any())
@ -184,18 +184,16 @@ namespace ImageSharp.Drawing.Shapes
/// </summary> /// </summary>
/// <param name="source">The source.</param> /// <param name="source">The source.</param>
/// <param name="target">The target.</param> /// <param name="target">The target.</param>
/// <returns></returns> /// <returns>true if the 2 shapes bounding boxes overlap.</returns>
private bool OverlappingBoundingBoxes(IShape source, IShape target) private bool OverlappingBoundingBoxes(IShape source, IShape target)
{ {
return source.Bounds.Intersects(target.Bounds); return source.Bounds.Intersects(target.Bounds);
} }
private void FixAndSetShapes(IShape[] outlines, IShape[] holes) private void FixAndSetShapes(IShape[] outlines, IShape[] holes)
{ {
// if any outline doesn't overlap another shape then we don't have to bother with sending them through clipper // if any outline doesn't overlap another shape then we don't have to bother with sending them through clipper
// as sending then though clipper will turn them into generic polygons and loose thier shape specific optimisations // as sending then though clipper will turn them into generic polygons and loose thier shape specific optimisations
int outlineLength = outlines.Length; int outlineLength = outlines.Length;
int holesLength = holes?.Length ?? 0; int holesLength = holes?.Length ?? 0;
bool[] overlappingOutlines = new bool[outlineLength]; bool[] overlappingOutlines = new bool[outlineLength];
@ -210,7 +208,7 @@ namespace ImageSharp.Drawing.Shapes
// skip the bounds check if they are already tested // skip the bounds check if they are already tested
if (overlappingOutlines[i] == false || overlappingOutlines[j] == false) if (overlappingOutlines[i] == false || overlappingOutlines[j] == false)
{ {
if (OverlappingBoundingBoxes(outlines[i], outlines[j])) if (this.OverlappingBoundingBoxes(outlines[i], outlines[j]))
{ {
overlappingOutlines[i] = true; overlappingOutlines[i] = true;
overlappingOutlines[j] = true; overlappingOutlines[j] = true;
@ -223,7 +221,7 @@ namespace ImageSharp.Drawing.Shapes
{ {
if (overlappingOutlines[i] == false || overlappingHoles[k] == false) if (overlappingOutlines[i] == false || overlappingHoles[k] == false)
{ {
if (OverlappingBoundingBoxes(outlines[i], holes[k])) if (this.OverlappingBoundingBoxes(outlines[i], holes[k]))
{ {
overlappingOutlines[i] = true; overlappingOutlines[i] = true;
overlappingHoles[k] = true; overlappingHoles[k] = true;
@ -263,7 +261,8 @@ namespace ImageSharp.Drawing.Shapes
} }
this.shapes = newShapes.ToArray(); this.shapes = newShapes.ToArray();
}else }
else
{ {
this.shapes = outlines; this.shapes = outlines;
} }

3
src/ImageSharp/Drawing/Shapes/Polygon.cs

@ -108,8 +108,7 @@ namespace ImageSharp.Drawing.Shapes
/// <summary> /// <summary>
/// Calcualtes the distance along and away from the path for a specified point. /// Calcualtes the distance along and away from the path for a specified point.
/// </summary> /// </summary>
/// <param name="x">The x.</param> /// <param name="point">The point along the path.</param>
/// <param name="y">The y.</param>
/// <returns> /// <returns>
/// distance metadata about the point. /// distance metadata about the point.
/// </returns> /// </returns>

Loading…
Cancel
Save