Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Aug 25, 2023
1 parent 1f10870 commit 2b36da2
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions src/Svg.Model/SvgExtensions.Pathing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,27 +263,25 @@ internal static System.Drawing.PointF ToAbsolute(System.Drawing.PointF point, bo
{
return skPath;
}
else

if (svgPathSegmentList[i + 1] is SvgMoveToSegment)
{
if (svgPathSegmentList[i + 1] is SvgMoveToSegment)
{
return skPath;
}
return skPath;
}

if (svgPathSegmentList[i + 1] is SvgClosePathSegment)
{
return skPath;
}
if (svgPathSegmentList[i + 1] is SvgClosePathSegment)
{
return skPath;
}

isEndFigure = true;
haveFigure = false;
var end = ToAbsolute(svgMoveToSegment.End, svgMoveToSegment.IsRelative, start);
skPath.MoveTo(end.X, end.Y);
start = end;
prevMove = end;
}
break;

}
case SvgLineSegment svgLineSegment:
{
if (isEndFigure == false)
Expand All @@ -296,9 +294,8 @@ internal static System.Drawing.PointF ToAbsolute(System.Drawing.PointF point, bo
points.Add(start);
points.Add(end);
start = end;
}
break;

}
case SvgCubicCurveSegment svgCubicCurveSegment:
{
if (isEndFigure == false)
Expand Down Expand Up @@ -335,9 +332,8 @@ internal static System.Drawing.PointF ToAbsolute(System.Drawing.PointF point, bo
points.Add(second);
points.Add(end);
start = end;
}
break;

}
case SvgQuadraticCurveSegment svgQuadraticCurveSegment:
{
if (isEndFigure == false)
Expand Down Expand Up @@ -372,9 +368,8 @@ internal static System.Drawing.PointF ToAbsolute(System.Drawing.PointF point, bo
points.Add(controlPoint);
points.Add(end);
start = end;
}
break;

}
case SvgArcSegment svgArcSegment:
{
if (isEndFigure == false)
Expand All @@ -392,9 +387,8 @@ internal static System.Drawing.PointF ToAbsolute(System.Drawing.PointF point, bo
points.Add(start);
points.Add(end);
start = end;
}
break;

}
case SvgClosePathSegment _:
{
if (isEndFigure == false)
Expand All @@ -409,8 +403,8 @@ internal static System.Drawing.PointF ToAbsolute(System.Drawing.PointF point, bo
haveFigure = false;
skPath.Close();
start = prevMove;
}
break;
}
}
}

Expand Down

0 comments on commit 2b36da2

Please sign in to comment.