Skip to content

Commit

Permalink
Added sme more docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
allisterb committed Aug 28, 2017
1 parent 9ecb9a0 commit 995519c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 9 additions & 2 deletions SvgNet/SVGGraphics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,11 @@ public void DrawLines(Pen pen, Point[] points)
/// <summary>
/// Implemented
/// </summary>
/// <remarks>
/// Mainly based on the libgdi+ implementation: https://github.com/mono/libgdiplus/blob/master/src/graphics-cairo.c
/// and this SO question reply: https://stackoverflow.com/questions/1790862/how-to-determine-endpoints-of-arcs-in-graphicspath-pathpoints-and-pathtypes-arra
/// from SiiliconMind.
/// </remarks>
public void DrawPath(Pen pen, GraphicsPath path)
{
//Save the original pen dash style in case we need to change it
Expand All @@ -1994,12 +1999,13 @@ public void DrawPath(Pen pen, GraphicsPath path)
PointF[] bezierCurvePoints = new PointF[4];
for (int i = 0; i < subpath.PathPoints.Length; i++)
{
/* Each subpath point has a corresponding type which can be:
/* Each subpath point has a corresponding path point type which can be:
*The point starts the subpath
*The point is a line point
*The point is Bezier curve point
* Another point type like dash-mode
*/
switch ((PathPointType)subpath.PathTypes[i] & PathPointType.PathTypeMask)
switch ((PathPointType)subpath.PathTypes[i] & PathPointType.PathTypeMask) //Mask off non path-type types
{
case PathPointType.Start:
start = subpath.PathPoints[i];
Expand All @@ -2023,6 +2029,7 @@ public void DrawPath(Pen pen, GraphicsPath path)
}
continue;
default:

switch ((PathPointType)subpath.PathTypes[i])
{
case PathPointType.DashMode:
Expand Down
5 changes: 5 additions & 0 deletions SvgNet/svgnetdoc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 995519c

Please sign in to comment.