checkin for Dennis Hayes, see changeLog for details
[mono.git] / mcs / class / System.Drawing / System.Drawing / Pen.cs
1 //
2 // System.Drawing.Pen.cs
3 //
4 // Author:
5 //   Miguel de Icaza (miguel@ximian.com)
6 //
7 // (C) Ximian, Inc.  http://www.ximian.com
8 //
9
10 using System;
11
12 namespace System.Drawing {
13
14         public sealed class Pen : MarshalByRefObject { //, ICloneable, IDisposable {
15                 Brush brush;
16                 Color color;
17                 float width;
18                 //PenAlignment alignment;
19                 
20                 public Pen (Brush brush)
21                 {
22                         this.brush = brush;
23                         width = 1;
24                 }
25
26                 public Pen (Color color)
27                 {
28                         this.color = color;
29                         width = 1;
30                 }
31
32                 public Pen (Brush brush, float width)
33                 {
34                         this.width = width;
35                         this.brush = brush;
36                 }
37
38                 public Pen (Color color, float width)
39                 {
40                         this.width = width;
41                         this.color = color;
42                 }
43
44                 //
45                 // Properties
46                 //
47 //              public PenAlignment Alignment {
48 //                      get {
49 //                              return alignment;
50 //                      }
51 //
52 //                      set {
53 //                              alignment = value;
54 //                      }
55 //              }
56
57                 public Brush Brush {
58                         get {
59                                 return brush;
60                         }
61
62                         set {
63                                 brush = value;
64                         }
65                 }
66
67                 public Color Color {
68                         get {
69                                 return color;
70                         }
71
72                         set {
73                                 color = value;
74                         }
75                 }
76
77                 public float Width {
78                         get {
79                                 return width;
80                         }
81                         set {
82                                 width = value;
83                         }
84                 }
85
86 //              public object Clone ()
87 //              {
88 //                      Pen p = new Pen (brush, width);
89 //                      
90 //                      p.color = color;
91 //                      p.alignment = alignment;
92 //
93 //                      return p;
94 //              }
95
96                 public void Dispose ()
97                 {
98                         Dispose (true);
99                         System.GC.SuppressFinalize (this);
100                 }
101
102                 void Dispose (bool disposing)
103                 {
104                         // Nothing for now.
105                 }
106
107                 ~Pen ()
108                 {
109                         Dispose (false);
110                 }
111         }
112 }