Permalink
Browse files

More work to get the test MainSoft suite running

  • Loading branch information...
1 parent 29710e9 commit a21fd3193db607a7986bab7484f7f6c406fb43b1 @migueldeicaza migueldeicaza committed Apr 19, 2012
@@ -453,7 +453,47 @@ public void AddLine (PointF pt1, PointF pt2)
Append (pt1.X, pt1.Y, PathPointType.Line, true);
Append (pt2.X, pt2.Y, PathPointType.Line, false);
}
-
+
+ public void AddLines (Point [] points)
+ {
+ if (points == null)
+ throw new ArgumentNullException ("points");
+ if (points.Length == 0)
+ throw new ArgumentException ("points");
+
+ /* only the first point can be compressed (i.e. removed if identical to previous) */
+ for (int i = 0, count = points.Length; i < count; i++)
+ Append (points [i].X, points [i].Y, PathPointType.Line, (i == 0));
+ }
+
+ public void AddLines (PointF [] points)
+ {
+ if (points == null)
+ throw new ArgumentNullException ("points");
+ if (points.Length == 0)
+ throw new ArgumentException ("points");
+
+ /* only the first point can be compressed (i.e. removed if identical to previous) */
+ for (int i = 0, count = points.Length; i < count; i++)
+ Append (points [i].X, points [i].Y, PathPointType.Line, (i == 0));
+ }
+
+ public void AddRectangle (Rectangle rect)
+ {
+ Append (rect.X, rect.Y, PathPointType.Start, false);
+ Append (rect.Right, rect.Y, PathPointType.Start, false);
+ Append (rect.Right, rect.Bottom, PathPointType.Start, false);
+ Append (rect.X, rect.Y, PathPointType.Start, false);
+ }
+
+ public void AddRectangle (RectangleF rect)
+ {
+ Append (rect.X, rect.Y, PathPointType.Start, false);
+ Append (rect.Right, rect.Y, PathPointType.Start, false);
+ Append (rect.Right, rect.Bottom, PathPointType.Start, false);
+ Append (rect.X, rect.Y, PathPointType.Start, false);
+ }
+
public void AddPie (float x, float y, float width, float height, float startAngle, float sweepAngle)
{
float sin_alpha, cos_alpha;
@@ -500,6 +540,26 @@ public void AddPie(int x, int y, int width, int height, float startAngle, float
{
AddPie (x, y, width, height, startAngle, sweepAngle);
}
+
+ public void AddArc (Rectangle rect, float start_angle, float sweep_angle)
+ {
+ AppendArcs (rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle);
+ }
+
+ public void AddArc (RectangleF rect, float start_angle, float sweep_angle)
+ {
+ AppendArcs (rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle);
+ }
+
+ public void AddArc (int x, int y, int width, int height, float start_angle, float sweep_angle)
+ {
+ AppendArcs (x, y, width, height, start_angle, sweep_angle);
+ }
+
+ public void AddArc (float x, float y, float width, float height, float start_angle, float sweep_angle)
+ {
+ AppendArcs (x, y, width, height, start_angle, sweep_angle);
+ }
internal static PointF [] OpenCurveTangents (int terms, PointF [] points, int count, float tension)
{
@@ -0,0 +1,9 @@
+using System;
+
+namespace System.Drawing.Drawing2D
+{
+ public class GraphicsState {
+
+ }
+}
+
@@ -0,0 +1,22 @@
+using System.Drawing.Drawing2D;
+using System.Runtime.InteropServices;
+
+namespace System.Drawing.Imaging {
+
+ [StructLayout(LayoutKind.Sequential)]
+ public sealed class ImageAttributes : ICloneable, IDisposable {
+ #region ICloneable implementation
+ public object Clone ()
+ {
+ throw new NotImplementedException ();
+ }
+ #endregion
+
+ #region IDisposable implementation
+ public void Dispose ()
+ {
+ throw new NotImplementedException ();
+ }
+ #endregion
+ }
+}
View
@@ -138,5 +138,6 @@ public void UnlockBits (BitmapData data)
{
throw new NotImplementedException ();
}
+
}
}
View
@@ -0,0 +1,97 @@
+using System;
+using System.Runtime.Serialization;
+
+namespace System.Drawing
+{
+
+ public sealed class Font : MarshalByRefObject, ISerializable, ICloneable, IDisposable {
+ const byte DefaultCharSet = 1;
+
+ public Font (FontFamily family, float emSize, GraphicsUnit unit)
+ : this (family, emSize, FontStyle.Regular, unit, DefaultCharSet, false)
+ {
+ }
+
+ public Font (string familyName, float emSize, GraphicsUnit unit)
+ : this (new FontFamily (familyName), emSize, FontStyle.Regular, unit, DefaultCharSet, false)
+ {
+ }
+
+ public Font (FontFamily family, float emSize)
+ : this (family, emSize, FontStyle.Regular, GraphicsUnit.Point, DefaultCharSet, false)
+ {
+ }
+
+ public Font (FontFamily family, float emSize, FontStyle style)
+ : this (family, emSize, style, GraphicsUnit.Point, DefaultCharSet, false)
+ {
+ }
+
+ public Font (FontFamily family, float emSize, FontStyle style, GraphicsUnit unit)
+ : this (family, emSize, style, unit, DefaultCharSet, false)
+ {
+ }
+
+ public Font (FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet)
+ : this (family, emSize, style, unit, gdiCharSet, false)
+ {
+ }
+
+ public Font (FontFamily family, float emSize, FontStyle style,
+ GraphicsUnit unit, byte gdiCharSet, bool gdiVerticalFont)
+ {
+ if (family == null)
+ throw new ArgumentNullException ("family");
+
+ throw new NotImplementedException ();
+ }
+
+ public Font (string familyName, float emSize)
+ : this (familyName, emSize, FontStyle.Regular, GraphicsUnit.Point, DefaultCharSet, false)
+ {
+ }
+
+ public Font (string familyName, float emSize, FontStyle style)
+ : this (familyName, emSize, style, GraphicsUnit.Point, DefaultCharSet, false)
+ {
+ }
+
+ public Font (string familyName, float emSize, FontStyle style, GraphicsUnit unit)
+ : this (familyName, emSize, style, unit, DefaultCharSet, false)
+ {
+ }
+
+ public Font (string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet)
+ : this (familyName, emSize, style, unit, gdiCharSet, false)
+ {
+ }
+
+ public Font (string familyName, float emSize, FontStyle style,
+ GraphicsUnit unit, byte gdiCharSet, bool gdiVerticalFont )
+ {
+ throw new NotImplementedException ();
+ }
+
+ #region ISerializable implementation
+ public void GetObjectData (SerializationInfo info, StreamingContext context)
+ {
+ throw new NotImplementedException ();
+ }
+ #endregion
+
+ #region ICloneable implementation
+ public object Clone ()
+ {
+ throw new NotImplementedException ();
+ }
+ #endregion
+
+ #region IDisposable implementation
+ public void Dispose ()
+ {
+ throw new NotImplementedException ();
+ }
+ #endregion
+ }
+}
+
Oops, something went wrong.

0 comments on commit a21fd31

Please sign in to comment.