From a47e80ab7d7df572aa335bff04760419446e4b84 Mon Sep 17 00:00:00 2001 From: Alexandre Pigolkine Date: Sun, 15 Jun 2003 00:00:01 +0000 Subject: [PATCH] switch to unix line terminators svn path=/trunk/mcs/; revision=15394 --- .../System.Drawing.Imaging/ChangeLog | 132 ++++----- .../System.Drawing.Imaging/ColorPalette.cs | 93 ++++--- .../System.Drawing.Imaging/ImageCodecInfo.cs | 262 ++++++++++-------- .../System.Drawing.Imaging/ImageFormat.cs | 195 ++++++------- 4 files changed, 368 insertions(+), 314 deletions(-) diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog b/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog index e3ae2b6fd6e..5673f7ed650 100644 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog @@ -1,66 +1,66 @@ -2002-9-2 DennisHayes - -* PropertyItem.cs t -* MetaHeader.cs t -* MetafileHeader.cs t -* Metafile.cs t -* ImageFormat.cs t -* ImageCodecInfo.cs t -* ColorMatrix.cs t -* ColorMap.cs t -* WmfPlaceableFileHeader.cs t -* Added todos back - -2002-9-2 DennisHayes - * checked in for Everaldo Canuto (everaldo.canuto@bol,com.br) - * BitmapData.cs - * ColorAdjustType.cs - * ColorChannelFlag.cs - * ColorMap.cs - * ColorMapType.cs - * ColorMatrix.cs - * ColorMatrixFlag.cs - * ColorMode.cs - * EmfPlusRecordType.cs - * EmfType.cs - * EncoderParameterValueType.cs - * EncoderValue.cs - * ImageCodecFlags.cs - * ImageCodecInfo.cs - * ImageFlags.cs - * ImageFormat.cs - * ImageLockMode.cs - * MetafileFrameUnit.cs - * MetafileHeader.cs - * MetaHeader.cs - * PaletteFlags.cs - * PixelFormat.cs - * PlayRecordCallback.cs - * PropertyItem.cs - * WmfPlaceableFileHeader.cs - * Added null classes for most/all classes, Many stubs, and some implmentation - -2002-9-2 DennisHayes - - * ColorPalette.cs - * FrameDimension.cs - * Metafile.cs - * Added stubs, implmentation - -2002-05-03 Mike Kestner - - * Metafile.cs : Use System.IO. Fix exception typos. - -2002-04-27 Christian Meyer - - * Metafile.cs: Copyright now holds Ximian. - -2002-04-21 Dennis Hayes - - * corrected emum values. - -2002-04-14 Christian Meyer - - * ChangeLog: created. - * Metafile.cs: Added. Wrote some ctors. No impl done, yet. - +2002-9-2 DennisHayes + +* PropertyItem.cs t +* MetaHeader.cs t +* MetafileHeader.cs t +* Metafile.cs t +* ImageFormat.cs t +* ImageCodecInfo.cs t +* ColorMatrix.cs t +* ColorMap.cs t +* WmfPlaceableFileHeader.cs t +* Added todos back + +2002-9-2 DennisHayes + * checked in for Everaldo Canuto (everaldo.canuto@bol,com.br) + * BitmapData.cs + * ColorAdjustType.cs + * ColorChannelFlag.cs + * ColorMap.cs + * ColorMapType.cs + * ColorMatrix.cs + * ColorMatrixFlag.cs + * ColorMode.cs + * EmfPlusRecordType.cs + * EmfType.cs + * EncoderParameterValueType.cs + * EncoderValue.cs + * ImageCodecFlags.cs + * ImageCodecInfo.cs + * ImageFlags.cs + * ImageFormat.cs + * ImageLockMode.cs + * MetafileFrameUnit.cs + * MetafileHeader.cs + * MetaHeader.cs + * PaletteFlags.cs + * PixelFormat.cs + * PlayRecordCallback.cs + * PropertyItem.cs + * WmfPlaceableFileHeader.cs + * Added null classes for most/all classes, Many stubs, and some implmentation + +2002-9-2 DennisHayes + + * ColorPalette.cs + * FrameDimension.cs + * Metafile.cs + * Added stubs, implmentation + +2002-05-03 Mike Kestner + + * Metafile.cs : Use System.IO. Fix exception typos. + +2002-04-27 Christian Meyer + + * Metafile.cs: Copyright now holds Ximian. + +2002-04-21 Dennis Hayes + + * corrected emum values. + +2002-04-14 Christian Meyer + + * ChangeLog: created. + * Metafile.cs: Added. Wrote some ctors. No impl done, yet. + diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs index f1ade643a8f..9fd13de6997 100755 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs @@ -1,44 +1,49 @@ -// -// System.Drawing.Imaging.ColorPalette.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// -// Author: -// Miguel de Icaza (miguel@ximian.com -// - -using System; -using System.Drawing; -namespace System.Drawing.Imaging -{ - public sealed class ColorPalette { - // 0x1: the color values in the array contain alpha information - // 0x2: the color values are grayscale values. - // 0x4: the colors in the array are halftone values. - - int flags; - Color [] entries; - - // - // There is no public constructor, this will be used somewhere in the - // drawing code - // - internal ColorPalette () - { - flags = 0; - entries = new Color [0]; - } - - public Color [] Entries { - get { - return entries; - } - } - - public int Flags { - get { - return flags; - } - } - } -} +// +// System.Drawing.Imaging.ColorPalette.cs +// +// (C) 2002 Ximian, Inc. http://www.ximian.com +// +// Author: +// Miguel de Icaza (miguel@ximian.com +// + +using System; +using System.Drawing; +namespace System.Drawing.Imaging +{ + public sealed class ColorPalette { + // 0x1: the color values in the array contain alpha information + // 0x2: the color values are grayscale values. + // 0x4: the colors in the array are halftone values. + + int flags; + Color [] entries; + + // + // There is no public constructor, this will be used somewhere in the + // drawing code + // + internal ColorPalette () + { + flags = 0; + entries = new Color [0]; + } + + internal ColorPalette (int flags, Color[] colors) { + this.flags = flags; + entries = colors; + } + + public Color [] Entries { + get { + return entries; + } + } + + public int Flags { + get { + return flags; + } + } + } +} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.cs index 9180b01e44c..564578353b5 100644 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.cs +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.cs @@ -1,109 +1,153 @@ -// -// System.Drawing.Imaging.ImageCodecInfo.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Everaldo Canuto -// eMail: everaldo.canuto@bol.com.br -// Dennis Hayes (dennish@raytek.com) -// -using System; - -namespace System.Drawing.Imaging { - - //[ComVisible(false)] - public sealed class ImageCodecInfo { - - // methods - [MonoTODO] - //[ComVisible(false)] - public static ImageCodecInfo[] GetImageDecoders() { - throw new NotImplementedException (); - } - - [MonoTODO] - //[ComVisible(false)] - public static ImageCodecInfo[] GetImageEncoders() { - throw new NotImplementedException (); - } - - // properties - [MonoTODO] - //[ComVisible(false)] - public Guid Clsid { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public string CodecName { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public string DllName { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public string FilenameExtension { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public ImageCodecFlags Flags { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public string FormatDescription { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public Guid FormatID { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public string MimeType { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public byte[][] SignatureMasks { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public byte[][] SignaturePatterns { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - [MonoTODO] - //[ComVisible(false)] - public int Version { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } - } - - } - -} +// +// System.Drawing.Imaging.ImageCodecInfo.cs +// +// (C) 2002 Ximian, Inc. http://www.ximian.com +// Author: Everaldo Canuto +// eMail: everaldo.canuto@bol.com.br +// Dennis Hayes (dennish@raytek.com) +// Alexandre Pigolkine (pigolkine@gmx.de) +// +using System; +using System.Collections; +using System.IO; + +namespace System.Drawing.Imaging { + + //[ComVisible(false)] + public sealed class ImageCodecInfo { + + Guid clsid; + string codecName; + string dllName; + string filenameExtension; + ImageCodecFlags flags; + string formatDescription; + Guid formatID; + string mimeType; + byte[][] signatureMasks; + byte[][] signaturePatterns; + int version; + + static ArrayList allCodecs = new ArrayList(); + + static ImageCodecInfo() { + allCodecs.Add(BMPCodec.CodecInfo); + allCodecs.Add(JPEGCodec.CodecInfo); + } + + internal delegate void DecodeFromStream( Stream stream, InternalImageInfo info); + internal DecodeFromStream decode; + + internal delegate void EncodeToStream( Stream stream, InternalImageInfo info); + internal EncodeToStream encode; + + // methods + [MonoTODO] + //[ComVisible(false)] + public static ImageCodecInfo[] GetImageDecoders() { + ArrayList decoders = new ArrayList(); + foreach( ImageCodecInfo info in allCodecs) { + if( (info.Flags & ImageCodecFlags.Decoder) != 0) { + decoders.Add( info); + } + } + ImageCodecInfo[] result = new ImageCodecInfo[decoders.Count]; + decoders.CopyTo( result, 0); + return result; + } + + [MonoTODO] + //[ComVisible(false)] + public static ImageCodecInfo[] GetImageEncoders() { + ArrayList encoders = new ArrayList(); + foreach( ImageCodecInfo info in allCodecs) { + if( (info.Flags & ImageCodecFlags.Encoder) != 0) { + encoders.Add( info); + } + } + ImageCodecInfo[] result = new ImageCodecInfo[encoders.Count]; + encoders.CopyTo( result, 0); + return result; + } + + // properties + [MonoTODO] + //[ComVisible(false)] + public Guid Clsid { + get { return clsid; } + set { clsid = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public string CodecName { + get { return codecName; } + set { codecName = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public string DllName { + get { return dllName; } + set { dllName = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public string FilenameExtension { + get { return filenameExtension; } + set { filenameExtension = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public ImageCodecFlags Flags { + get { return flags; } + set { flags = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public string FormatDescription { + get { return formatDescription; } + set { formatDescription = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public Guid FormatID { + get { return formatID; } + set { formatID = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public string MimeType { + get { return mimeType; } + set { mimeType = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public byte[][] SignatureMasks { + get { return signatureMasks; } + set { signatureMasks = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public byte[][] SignaturePatterns { + get { return signaturePatterns; } + set { signaturePatterns = value; } + } + + [MonoTODO] + //[ComVisible(false)] + public int Version { + get { return version; } + set { version = value; } + } + + } + +} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs index 72d8ea26e18..cfb2e838325 100644 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs @@ -1,95 +1,100 @@ -// -// System.Drawing.Imaging.ImageFormat.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Everaldo Canuto -// eMail: everaldo.canuto@bol.com.br -// Dennis Hayes (dennish@raytek.com) -// -using System; - -namespace System.Drawing.Imaging { - - public sealed class ImageFormat { - - // constructors - [MonoTODO] - public ImageFormat(Guid guid) { - throw new NotImplementedException (); - } - - // methods - [MonoTODO] - public override bool Equals(object o) { - throw new NotImplementedException (); - } - - [MonoTODO] - public override int GetHashCode() { - throw new NotImplementedException (); - } - - [MonoTODO] - public override string ToString() { - throw new NotImplementedException (); - } - - // properties - [MonoTODO] - public static ImageFormat Bmp { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat Emf { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat Exif { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat Gif { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public Guid Guid { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat Icon { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat Jpeg { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat MemoryBmp { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat Png { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat Tiff { - get { throw new NotImplementedException (); } - } - - [MonoTODO] - public static ImageFormat Wmf { - get { throw new NotImplementedException (); } - } - - } - -} +// +// System.Drawing.Imaging.ImageFormat.cs +// +// (C) 2002 Ximian, Inc. http://www.ximian.com +// Author: Everaldo Canuto +// eMail: everaldo.canuto@bol.com.br +// Dennis Hayes (dennish@raytek.com) +// +using System; + +namespace System.Drawing.Imaging { + + public sealed class ImageFormat { + + Guid guid_; + + // constructors + [MonoTODO] + public ImageFormat(Guid guid) { + guid_ = guid; + } + + // methods + [MonoTODO] + public override bool Equals(object o) { + return base.Equals(o); + } + + [MonoTODO] + public override int GetHashCode() { + return base.GetHashCode(); + } + + [MonoTODO] + public override string ToString() { + throw new NotImplementedException (); + } + + // properties + static ImageFormat BmpImageFormat_ = new ImageFormat(new Guid("DFB9AC7D-498D-4bd8-9D42-E23E541964B1")); + + [MonoTODO] + public static ImageFormat Bmp { + get { return BmpImageFormat_; } + } + + [MonoTODO] + public static ImageFormat Emf { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public static ImageFormat Exif { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public static ImageFormat Gif { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public Guid Guid { + get { return guid_; } + } + + [MonoTODO] + public static ImageFormat Icon { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + static ImageFormat JpegImageFormat_ = new ImageFormat(new Guid("83BFFDF8-398F-407f-BA33-A7993D11B2DA")); + public static ImageFormat Jpeg { + get { return JpegImageFormat_; } + } + + [MonoTODO] + public static ImageFormat MemoryBmp { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public static ImageFormat Png { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public static ImageFormat Tiff { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public static ImageFormat Wmf { + get { throw new NotImplementedException (); } + } + + } + +} -- 2.25.1