2 // System.Drawing.SolidBrush.cs
5 // Dennis Hayes (dennish@Raytek.com)
6 // Alexandre Pigolkine(pigolkine@gmx.de)
8 // (C) 2002 Ximian, Inc
12 namespace System.Drawing
14 public sealed class SolidBrush : Brush {
16 internal bool isModifiable = true;
19 internal SolidBrush (IntPtr ptr)
23 GDIPlus.GdipGetSolidFillColor (ptr, out val);
24 color = Color.FromArgb (val);
27 public SolidBrush (Color color)
31 GDIPlus.GdipCreateSolidFill (color.ToArgb (), out brush);
32 nativeObject = (IntPtr) brush;
43 throw new ArgumentException ("You may not change this Brush because it does not belong to you.");
47 public override object Clone()
49 return new SolidBrush (color);
52 protected override void Dispose (bool disposing)
55 GDIPlus.GdipDeleteBrush (nativeObject);
57 throw new ArgumentException ("You may not change this Brush because it does not belong to you.");