Skip to content

Commit

Permalink
Some throw-syntax changed to be more backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
StijnKuipers committed Jan 12, 2017
1 parent 2785e10 commit eeab851
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
6 changes: 3 additions & 3 deletions GerberLibrary/Artwork Related/SVGWriter.cs
Expand Up @@ -122,9 +122,9 @@ public CompositingMode CompositingMode
throw new NotImplementedException();
}
}

public bool Dotted { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
System.Drawing.Drawing2D.InterpolationMode GraphicsInterface.InterpolationMode { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
bool _Dotted;
public bool Dotted { get { return _Dotted; } set { _Dotted = value; }}
System.Drawing.Drawing2D.InterpolationMode GraphicsInterface.InterpolationMode { get { return System.Drawing.Drawing2D.InterpolationMode.Default; } set {; }}

public Color BackgroundColor = Color.White;
public List<string> OutputLines = new List<string>();
Expand Down
3 changes: 2 additions & 1 deletion GerberLibrary/Core/GraphicsInterface.cs
Expand Up @@ -165,7 +165,8 @@ public CompositingMode CompositingMode
}
}

public bool Dotted { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
bool _Dotted = false;
public bool Dotted { get { return _Dotted; } set { _Dotted = value; }}

public void DrawRectangle(Color color, float x, float y, float w, float h)
{
Expand Down
20 changes: 16 additions & 4 deletions GerberViewer/GLGraphicsInterface.cs
Expand Up @@ -128,9 +128,10 @@ public static Matrix4 Mat4FromMat(System.Drawing.Drawing2D.Matrix inp)

}

public CompositingMode CompositingMode { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public System.Drawing.Drawing2D.InterpolationMode InterpolationMode { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public bool IsFast { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public CompositingMode CompositingMode { get { return CompositingMode.SourceCopy; } set {; }}
public System.Drawing.Drawing2D.InterpolationMode InterpolationMode { get { return System.Drawing.Drawing2D.InterpolationMode.Default; } set {; } }

public bool IsFast { get { return true; } set {; } }
private System.Drawing.Drawing2D.Matrix trans = new System.Drawing.Drawing2D.Matrix();

public System.Drawing.Drawing2D.Matrix Transform
Expand Down Expand Up @@ -429,6 +430,11 @@ public void TranslateTransform(float p1, float p2)
{

}

public void FillTriangles(List<Triangle> triangles, Color C)
{
throw new NotImplementedException();
}
}


Expand Down Expand Up @@ -734,7 +740,8 @@ public CompositingMode CompositingMode
}
}

public bool Dotted { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
bool _Dotted;
public bool Dotted { get { return _Dotted; } set { _Dotted = value; }}

public void DrawString(PointD pos, string text, double scale, bool center, float r = 0.2f, float g = 0.2f, float b = 0.2f, float a = 1.0f)
{
Expand Down Expand Up @@ -871,5 +878,10 @@ internal Matrix4 GetGlMatrix()
{
return Mat4FromMat(trans);
}

public void FillTriangles(List<Triangle> triangles, Color C)
{
throw new NotImplementedException();
}
}
}

0 comments on commit eeab851

Please sign in to comment.