Author: spouliot
Date: 2006-11-22 16:57:50 -0500 (Wed, 22 Nov 2006)
New Revision: 68373
Modified:
trunk/mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs
trunk/mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs
trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
trunk/mcs/class/System.Drawing/System.Drawing/Font.cs
trunk/mcs/class/System.Drawing/System.Drawing/FontFamily.cs
trunk/mcs/class/System.Drawing/System.Drawing/Graphics.cs
trunk/mcs/class/System.Drawing/System.Drawing/Icon.cs
trunk/mcs/class/System.Drawing/System.Drawing/Image.cs
trunk/mcs/class/System.Drawing/System.Drawing/ImageFormatConverter.cs
trunk/mcs/class/System.Drawing/System.Drawing/Region.cs
trunk/mcs/class/System.Drawing/System.Drawing/SystemIcons.cs
Log:
2006-11-22 Sebastien Pouliot <[EMAIL PROTECTED]>
* BufferedGraphicsContext.cs: Better MonoTODO.
* BufferedGraphics.cs: Better MonoTODO.
* Font.cs: Better MonoTODO.
* FontFamily.cs: Better MonoTODO.
* Graphics.cs: Better MonoTODO.
* Icon.cs: Better MonoTODO.
* Image.cs: Second chance while saving using the current RawFormat.
This allows icons to be saved as PNG (strange but look at unit tests).
* ImageFormatConverter.cs: Implement GetStandardValues (and remove
it's MonoTODO) and fix GetStandardValuesSupported (to return true).
* Region.cs: Implement ReleaseHrgn (2.0) - not really useful (as the
handle is never exposed) but it's easier than to document the TODO ;-)
* SystemIcons.cs: Better MonoTODO.
Modified: trunk/mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs
2006-11-22 21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs
2006-11-22 21:57:50 UTC (rev 68373)
@@ -28,10 +28,10 @@
#if NET_2_0
-using System;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
using System.Runtime.Serialization;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Drawing
{
@@ -106,7 +106,8 @@
target.DrawImage (membmp, size);
}
- [MonoTODO]
+ [MonoTODO ("The targetDC parameter has no equivalent in
libgdiplus.")]
+ [SecurityPermission (SecurityAction.Demand, UnmanagedCode =
true)]
public void Render (IntPtr targetDC)
{
throw new NotImplementedException ();
@@ -115,4 +116,3 @@
}
#endif
-
Modified:
trunk/mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs
2006-11-22 21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs
2006-11-22 21:57:50 UTC (rev 68373)
@@ -28,10 +28,10 @@
#if NET_2_0
-using System;
-using System.Runtime.Serialization;
-using System.Runtime.InteropServices;
using System.ComponentModel;
+using System.Runtime.InteropServices;
+using System.Runtime.Serialization;
+using System.Security.Permissions;
namespace System.Drawing
{
@@ -46,7 +46,6 @@
~BufferedGraphicsContext ()
{
-
}
public BufferedGraphics Allocate (Graphics targetGraphics,
Rectangle targetRectangle)
@@ -55,7 +54,8 @@
return graphics;
}
- [MonoTODO]
+ [MonoTODO ("The targetDC parameter has no equivalent in
libgdiplus.")]
+ [SecurityPermission (SecurityAction.Demand, UnmanagedCode =
true)]
public BufferedGraphics Allocate (IntPtr targetDC, Rectangle
targetRectangle)
{
throw new NotImplementedException ();
@@ -68,7 +68,6 @@
public void Invalidate ()
{
-
}
public Size MaximumBuffer {
@@ -86,4 +85,3 @@
}
#endif
-
Modified: trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog 2006-11-22
21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog 2006-11-22
21:57:50 UTC (rev 68373)
@@ -1,3 +1,19 @@
+2006-11-22 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * BufferedGraphicsContext.cs: Better MonoTODO.
+ * BufferedGraphics.cs: Better MonoTODO.
+ * Font.cs: Better MonoTODO.
+ * FontFamily.cs: Better MonoTODO.
+ * Graphics.cs: Better MonoTODO.
+ * Icon.cs: Better MonoTODO.
+ * Image.cs: Second chance while saving using the current RawFormat.
+ This allows icons to be saved as PNG (strange but look at unit tests).
+ * ImageFormatConverter.cs: Implement GetStandardValues (and remove
+ it's MonoTODO) and fix GetStandardValuesSupported (to return true).
+ * Region.cs: Implement ReleaseHrgn (2.0) - not really useful (as the
+ handle is never exposed) but it's easier than to document the TODO ;-)
+ * SystemIcons.cs: Better MonoTODO.
+
2006-11-06 Sebastien Pouliot <[EMAIL PROTECTED]>
* RectangleF.cs: Fix operator !=. Patch by Manuel Alejandro CerĂ³n
Modified: trunk/mcs/class/System.Drawing/System.Drawing/Font.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Font.cs 2006-11-22
21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Font.cs 2006-11-22
21:57:50 UTC (rev 68373)
@@ -536,14 +536,14 @@
return _name.GetHashCode ();
}
- [MonoTODO]
+ [MonoTODO ("The hdc parameter has no direct equivalent in
libgdiplus.")]
public static Font FromHdc (IntPtr hdc)
{
throw new NotImplementedException ();
}
- [MonoTODO("This is temporary implementation")]
- public static Font FromLogFont (object lf, IntPtr hdc)
+ [MonoTODO ("The returned font may not have all it's properties
initialized correctly.")]
+ public static Font FromLogFont (object lf, IntPtr hdc)
{
IntPtr newObject;
LOGFONT o = (LOGFONT)lf;
Modified: trunk/mcs/class/System.Drawing/System.Drawing/FontFamily.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/FontFamily.cs 2006-11-22
21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/FontFamily.cs 2006-11-22
21:57:50 UTC (rev 68373)
@@ -162,7 +162,7 @@
return (int) outProperty;
}
- // note: libgdiplus always returns true
+ [MonoTODO ("The method always return true when used with
libgdiplus.")]
public bool IsStyleAvailable (FontStyle style)
{
bool outProperty;
@@ -211,7 +211,7 @@
return fntcol.Families;
}
- [MonoTODO ("We only support the default system language")]
+ [MonoTODO ("The language parameter is ignored. We only support
the default system language")]
public string GetName (int language)
{
return Name;
Modified: trunk/mcs/class/System.Drawing/System.Drawing/Graphics.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Graphics.cs 2006-11-22
21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Graphics.cs 2006-11-22
21:57:50 UTC (rev 68373)
@@ -114,7 +114,7 @@
}
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void AddMetafileComment (byte [] data)
{
throw new NotImplementedException ();
@@ -130,7 +130,7 @@
return new GraphicsContainer(state);
}
- [MonoTODO ("rectangles and unit aren't supported in
libgdiplus")]
+ [MonoTODO ("The rectangles and unit parameters aren't supported
in libgdiplus")]
public GraphicsContainer BeginContainer (Rectangle dstrect,
Rectangle srcrect, GraphicsUnit unit)
{
uint state;
@@ -141,7 +141,7 @@
return new GraphicsContainer (state);
}
- [MonoTODO ("rectangles and unit aren't supported in
libgdiplus")]
+ [MonoTODO ("The rectangles and unit parameters aren't supported
in libgdiplus")]
public GraphicsContainer BeginContainer (RectangleF dstrect,
RectangleF srcrect, GraphicsUnit unit)
{
uint state;
@@ -1185,217 +1185,217 @@
GDIPlus.CheckStatus (status);
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point []
destPoints, EnumerateMetafileProc callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, RectangleF
destRect, EnumerateMetafileProc callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF []
destPoints, EnumerateMetafileProc callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Rectangle
destRect, EnumerateMetafileProc callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point
destPoint, EnumerateMetafileProc callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF
destPoint, EnumerateMetafileProc callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF
destPoint, EnumerateMetafileProc callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Rectangle
destRect, EnumerateMetafileProc callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF []
destPoints, EnumerateMetafileProc callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point
destPoint, EnumerateMetafileProc callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point []
destPoints, EnumerateMetafileProc callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, RectangleF
destRect, EnumerateMetafileProc callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF
destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point
destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF []
destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point []
destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, RectangleF
destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Rectangle
destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, RectangleF
destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes
imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point
destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes
imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF
destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes
imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point []
destPoints, EnumerateMetafileProc callback, IntPtr callbackData,
ImageAttributes imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF []
destPoints, EnumerateMetafileProc callback, IntPtr callbackData,
ImageAttributes imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Rectangle
destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes
imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Rectangle
destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF []
destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, RectangleF
destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF
destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point
destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point []
destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc
callback, IntPtr callbackData)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point []
destPoints, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc
callback, IntPtr callbackData, ImageAttributes imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Rectangle
destRect, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback,
IntPtr callbackData, ImageAttributes imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, Point
destPoint, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc
callback, IntPtr callbackData, ImageAttributes imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, RectangleF
destRect, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc
callback, IntPtr callbackData, ImageAttributes imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF []
destPoints, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc
callback, IntPtr callbackData, ImageAttributes imageAttr)
{
throw new NotImplementedException ();
}
- [MonoTODO]
+ [MonoTODO ("Metafiles, both WMF and EMF formats, aren't
supported.")]
public void EnumerateMetafile (Metafile metafile, PointF
destPoint, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc
callback, IntPtr callbackData, ImageAttributes imageAttr)
{
throw new NotImplementedException ();
@@ -2061,7 +2061,7 @@
}
#endif
- [MonoTODO]
+ [MonoTODO ("Parameter hdc doesn't map well into libgdiplus")]
#if NET_2_0
[EditorBrowsable (EditorBrowsableState.Never)]
#else
@@ -2377,7 +2377,7 @@
}
}
- [MonoTODO ("not supported by libgdiplus")]
+ [MonoTODO ("This property does not do anything when used with
libgdiplus.")]
public PixelOffsetMode PixelOffsetMode {
get {
PixelOffsetMode pixelOffset =
PixelOffsetMode.Invalid;
@@ -2421,7 +2421,7 @@
}
}
- [MonoTODO ("not supported by libgdiplus")]
+ [MonoTODO ("This property does not do anything when used with
libgdiplus.")]
public int TextContrast {
get {
int contrast;
Modified: trunk/mcs/class/System.Drawing/System.Drawing/Icon.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Icon.cs 2006-11-22
21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Icon.cs 2006-11-22
21:57:50 UTC (rev 68373)
@@ -101,7 +101,7 @@
{
}
#if INTPTR_SUPPORTED
- [MonoTODO ("Implement fully")]
+ // FIXME - Implement fully (well implement inside libgdiplus as
unmanaged code)
private Icon (IntPtr handle)
{
this.winHandle = handle;
@@ -210,20 +210,26 @@
}
#if NET_2_0
- public Icon (Stream stream, Size size) : this (stream,
size.Width, size.Height) {}
+ public Icon (Stream stream, Size size) :
+ this (stream, size.Width, size.Height)
+ {
+ }
- public Icon (string fileName, int width, int height):
- this (new FileStream (fileName, FileMode.Open), width,
height) {}
+ public Icon (string fileName, int width, int height) :
+ this (new FileStream (fileName, FileMode.Open), width,
height)
+ {
+ }
public Icon (string fileName, Size size) :
- this (new FileStream (fileName, FileMode.Open), size) {}
+ this (new FileStream (fileName, FileMode.Open), size)
+ {
+ }
- [MonoTODO]
+ [MonoTODO ("Method isn't implemented.")]
public static Icon ExtractAssociatedIcon (string filePath)
{
throw new NotImplementedException ();
}
-
#endif
public void Dispose ()
Modified: trunk/mcs/class/System.Drawing/System.Drawing/Image.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Image.cs 2006-11-22
21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Image.cs 2006-11-22
21:57:50 UTC (rev 68373)
@@ -398,10 +398,14 @@
public void Save(string filename, ImageFormat format)
{
ImageCodecInfo encoder = findEncoderForFormat (format);
-
- if (encoder == null)
- throw new ArgumentException ("No codec available for
format:" + format.Guid);
-
+ if (encoder == null) {
+ // second chance
+ encoder = findEncoderForFormat (RawFormat);
+ if (encoder == null) {
+ string msg = Locale.GetText ("No codec
available for saving format '{0}'.", format.Guid);
+ throw new ArgumentException (msg, "format");
+ }
+ }
Save (filename, encoder, null);
}
Modified: trunk/mcs/class/System.Drawing/System.Drawing/ImageFormatConverter.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/ImageFormatConverter.cs
2006-11-22 21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/ImageFormatConverter.cs
2006-11-22 21:57:50 UTC (rev 68373)
@@ -167,15 +167,25 @@
return base.ConvertTo (context, culture, val, destType);
}
- [MonoTODO ("Implement")]
- public override StandardValuesCollection GetStandardValues
(ITypeDescriptorContext context )
+ public override StandardValuesCollection GetStandardValues
(ITypeDescriptorContext context)
{
- throw new NotImplementedException ();
+ ImageFormat[] list = new ImageFormat [10];
+ list [0] = ImageFormat.MemoryBmp;
+ list [1] = ImageFormat.Bmp;
+ list [2] = ImageFormat.Emf;
+ list [3] = ImageFormat.Wmf;
+ list [4] = ImageFormat.Gif;
+ list [5] = ImageFormat.Jpeg;
+ list [6] = ImageFormat.Png;
+ list [7] = ImageFormat.Tiff;
+ list [8] = ImageFormat.Exif;
+ list [9] = ImageFormat.Icon;
+ return new TypeConverter.StandardValuesCollection
(list);
}
- public override bool GetStandardValuesSupported
(ITypeDescriptorContext context )
+ public override bool GetStandardValuesSupported
(ITypeDescriptorContext context)
{
- return false;
+ return true;
}
}
}
Modified: trunk/mcs/class/System.Drawing/System.Drawing/Region.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Region.cs 2006-11-22
21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Region.cs 2006-11-22
21:57:50 UTC (rev 68373)
@@ -642,12 +642,14 @@
}
}
#if NET_2_0
- [MonoTODO]
[SecurityPermission (SecurityAction.Demand, UnmanagedCode =
true)]
public void ReleaseHrgn (IntPtr regionHandle)
{
if (regionHandle == IntPtr.Zero)
- throw new ArgumentNullException
("regionHandle");
+ throw new ArgumentNullException
("regionHandle");
+
+ Status status = GDIPlus.GdipDeleteRegion (regionHandle);
+ GDIPlus.CheckStatus (status);
}
#endif
}
Modified: trunk/mcs/class/System.Drawing/System.Drawing/SystemIcons.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/SystemIcons.cs
2006-11-22 21:50:15 UTC (rev 68372)
+++ trunk/mcs/class/System.Drawing/System.Drawing/SystemIcons.cs
2006-11-22 21:57:50 UTC (rev 68373)
@@ -6,9 +6,6 @@
// Andreas Nahr ([EMAIL PROTECTED])
//
// (C) 2002 Ximian, Inc
-//
-
-//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -31,14 +28,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
+namespace System.Drawing {
-namespace System.Drawing
-{
- [MonoTODO ("not implemented")]
- public sealed class SystemIcons
- {
- private SystemIcons()
+ [MonoTODO ("Not implemented. All properties return null.")]
+ public sealed class SystemIcons {
+
+ private SystemIcons ()
{
}
@@ -52,7 +47,6 @@
public static Icon Warning { get { return LoadIcon();} }
public static Icon WinLogo { get { return LoadIcon();} }
- [MonoTODO]
private static Icon LoadIcon ()
{
return null;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches