Kaynağa Gözat

checkin for Dennis Hayes <[email protected]>, see ChangeLog

svn path=/trunk/mcs/; revision=12550
Alexandre Pigolkine 23 yıl önce
ebeveyn
işleme
c3af0168a9

+ 11 - 0
mcs/class/System.Drawing/System.Drawing.Drawing2D/ChangeLog

@@ -1,3 +1,14 @@
+2003-3-15 DennisHayes <[email protected]>
+	* Stubbed and somewhat implmented
+
+	* CustomLineCap.cs
+	* GraphicsContainer.cs
+	* GraphicsPath.cs
+	* GraphicsPathIterator.cs
+	* GraphicsState.cs
+	* HatchBrush.cs
+	* LinearGradientBrush.cs
+
 2003-3-5 DennisHayes <[email protected]>
 	* Added values for enums
 	* Stubbed and somewhat implmented Blend, ColorBlend, CustomLineCap

+ 69 - 3
mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.cs

@@ -13,16 +13,82 @@ namespace System.Drawing.Drawing2D {
 	/// Summary description for CustomLineCap.
 	/// </summary>
 	public class CustomLineCap {// : MarshalByRefObject, ICloneable, IDisposable {
+		private LineCap baseCap;
+		private float baseInsert;
+		private LineJoin strokeJoin;
+		private float widthScale;
+
+		// Constructors
+		// Constructor with no parameters is not part of spec. It was needed to get to compile. Bug in compiler?
 		protected CustomLineCap() {
 		}
-		public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePAth, LineCap baseCap, float baseInset) {
-
+		public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePath, LineCap baseCap, float baseInset) {
+			this.baseInsert = baseInsert;
 		}
 		public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePAth, LineCap baseCap) {
-
+			this.baseCap = baseCap;
 		}
 		public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePAth) {
+		}
 
+		public LineCap BaseCap{
+			get {
+				return baseCap;
+			}
+			set {
+				baseCap = value;
+			}
+		}
+		public LineJoin StrokeJoin{
+			get {
+				return strokeJoin;
+			}
+			set {
+				strokeJoin = value;
+			}
 		}
+		public float BaseInsert{
+			get {
+				return baseInsert;
+			}
+			set {
+				baseInsert = value;
+			}
+		}
+
+		public float WidthScale{
+			get {
+				return widthScale;
+			}
+			set {
+				widthScale = value;
+			}
+		}
+
+		//Public Methods
+
+		// Implment IConeable.Clone
+		//public virtural object Clone(){
+		//					//CustomLineCap newcustomlinecap = new CustomLineCap(
+		//}
+		
+		public virtual void Dispose(){
+			Dispose(true);
+		}
+		public virtual void Dispose(bool disposing){
+		}
+		
+		public void GetStrokeCaps(out LineCap startCap, out LineCap endCap){
+			startCap = baseCap;
+			endCap = baseCap;
+		}
+
+		public void SetStrokeCaps(LineCap startCap, LineCap endCap){
+		}
+
+		// Protected Methods
+
+		~CustomLineCap(){
+		 }
 	}
 }

+ 3 - 7
mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.cs

@@ -8,15 +8,11 @@
 //
 using System;
 
-namespace System.Drawing.Drawing2D
-{
+namespace System.Drawing.Drawing2D {
 	/// <summary>
 	/// Summary description for GraphicsContainer.
 	/// </summary>
-	public class GraphicsContainer
-	{
-		public GraphicsContainer()
-		{
-		}
+	public sealed class GraphicsContainer : MarshalByRefObject {
+		//Everything is inherited!
 	}
 }

+ 1 - 0
mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs

@@ -14,6 +14,7 @@ namespace System.Drawing.Drawing2D
 	/// </summary>
 	public sealed class GraphicsPath //: MarshalByRefObject, ICloneable, IDisposable
 	{
+		// Constructors
 		//[MonoTODO]
 		//public GraphicsPath() {
 		//}

+ 63 - 6
mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.cs

@@ -8,15 +8,72 @@
 //
 using System;
 
-namespace System.Drawing.Drawing2D
-{
+namespace System.Drawing.Drawing2D {
 	/// <summary>
 	/// Summary description for GraphicsPathIterator.
 	/// </summary>
-	public class GraphicsPathIterator
-	{
-		public GraphicsPathIterator()
-		{
+	/// 
+
+	public sealed class GraphicsPathIterator : MarshalByRefObject {
+
+		protected GraphicsPath path;
+		
+		// Constructors
+		public GraphicsPathIterator(GraphicsPath path) {
+			this.path = path;
+		}
+
+		//Public Properites
+		public int Count {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public int SubpathCount {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+
+		//Public Methods.
+		public int CopyData( ref PointF [] points, ref byte [] types, int startIndex, int endIndex){
+			throw new NotImplementedException ();
+		}
+
+		public void Dispose(){
+		}
+
+		public int Enumerate(ref PointF [] points, ref byte [] types){
+			throw new NotImplementedException ();
+		}
+
+		public bool HasCurve(){
+			throw new NotImplementedException ();
 		}
+
+		public int NextMarker(GraphicsPath path){
+			throw new NotImplementedException ();
+		}
+
+		public int NextMarker(out int startIndex, out int endIndex){
+			throw new NotImplementedException ();
+		}
+
+		public int NextPathType(out byte pathType, out int startIndex, int endIndex){
+			throw new NotImplementedException ();
+		}
+
+		public int NextSubpath(GraphicsPath path, out bool isClosed){
+			throw new NotImplementedException ();
+		}
+
+		public int NextSubpath(out int startIndex, out int endIndex, out bool isClosed){
+			throw new NotImplementedException ();
+		}
+
+		public void Rewind(){
+		}
+
 	}
 }

+ 3 - 7
mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.cs

@@ -8,15 +8,11 @@
 //
 using System;
 
-namespace System.Drawing.Drawing2D
-{
+namespace System.Drawing.Drawing2D {
 	/// <summary>
 	/// Summary description for GraphicsState.
 	/// </summary>
-	public class GraphicsState
-	{
-		public GraphicsState()
-		{
-		}
+	public sealed class GraphicsState {
+		//All members inherited
 	}
 }

+ 30 - 6
mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs

@@ -8,15 +8,39 @@
 //
 using System;
 
-namespace System.Drawing.Drawing2D
-{
+namespace System.Drawing.Drawing2D {
 	/// <summary>
 	/// Summary description for HatchBrush.
 	/// </summary>
-	public class HatchBrush
-	{
-		public HatchBrush()
-		{
+	public sealed class HatchBrush : Brush {
+		public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor) {
 		}
+
+		public HatchBrush(HatchStyle hatchstyle, Color foreColor) {
+		}
+
+		public Color BackgroundColor {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public Color ForegroundColor {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public HatchStyle HatchStyle {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public override object Clone(){
+			throw new NotImplementedException ();
+		}
+
+
 	}
 }

+ 91 - 4
mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs

@@ -8,15 +8,102 @@
 //
 using System;
 
-namespace System.Drawing2D
+namespace System.Drawing.Drawing2D
 {
 	/// <summary>
 	/// Summary description for LinearGradientBrush.
 	/// </summary>
-	public class LinearGradientBrush
+	public sealed class LinearGradientBrush : Brush
 	{
-		public LinearGradientBrush()
-		{
+		//Constructors.
+		public LinearGradientBrush(Point point1, Point point2, Color color1, Color color2) {
 		}
+
+		public LinearGradientBrush(PointF point1, PointF point2, Color color1, Color color2) {
+		}
+
+		public LinearGradientBrush(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode) {
+		}
+
+
+		//public Properties
+		public Blend Blend {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+			}
+		}
+
+		public bool GammaCorrection {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+			}
+		}
+
+		public ColorBlend InterpolationColors {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+			}
+		}
+
+		public Color [] LinearColors {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+			}
+		}
+		public RectangleF Rectange {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+		public Matrix Transform {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+			}
+		}
+
+		public WrapMode WrapMode {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+			}
+		}
+
+		// Public Methods
+		
+		public override object Clone(){
+			throw new NotImplementedException ();
+		}
+
+		public void MultiplyTransform(Matrix matrix){
+			throw new NotImplementedException ();
+		}
+
+		public void MultiplyTransform(Matrix matrix, MatrixOrder order){
+			throw new NotImplementedException ();
+		}
+
+		public void ResetTransform(){
+			throw new NotImplementedException ();
+		}
+
+		public void RotateTransform(float angle, MatrixOrder order){
+			throw new NotImplementedException ();
+		}
+
+		public void RotateTransform(float angle){
+			throw new NotImplementedException ();
+		}
+
 	}
 }