2 // System.Drawing.Image.cs
4 // (C) 2002/3 Ximian, Inc. http://www.ximian.com
6 // Christian Meyer <Christian.Meyer@cs.tum.edu>
7 // Jason Perkins <jason@379.com>
8 // Dennis Hayes <dennish@raytek.com>
9 // Alexandre Pigolkine <pigolkine@gmx.de>
12 using System.Runtime.Remoting;
13 using System.Runtime.Serialization;
14 using System.Drawing.Imaging;
16 using System.Runtime.InteropServices;
18 namespace System.Drawing.Cairo {
22 internal abstract class Image : MarshalByRefObject, IImage /*, ICloneable, ISerializable */
25 internal IntPtr state;
26 internal Cairo.Format cairo_format;
27 internal System.Drawing.Cairo.Graphics selected_into_graphics = null;
29 internal PixelFormat pixelFormat;
30 protected ImageFormat imageFormat;
36 public virtual object Clone()
38 throw new NotImplementedException ();
43 public static Image FromFile (string filename)
45 // Fixme: implement me
46 throw new NotImplementedException ();
49 public static Image FromFile (string filename, bool useEmbeddedColorManagement)
52 // Fixme: implement me
53 throw new NotImplementedException ();
56 public static Bitmap FromHbitmap (IntPtr hbitmap)
58 // Fixme: implement me
59 throw new NotImplementedException ();
62 public static Bitmap FromHbitmap (IntPtr hbitmap, IntPtr hpalette)
64 // Fixme: implement me
65 throw new NotImplementedException ();
69 public static Image FromStream (Stream stream)
71 throw new NotImplementedException ();
75 public static Image FromStream (Stream stream, bool useIcm)
77 throw new NotImplementedException ();
80 public static int GetPixelFormatSize (PixelFormat pixfmt)
82 // Fixme: implement me
83 throw new NotImplementedException ();
86 public static bool IsAlphaPixelFormat (PixelFormat pixfmt)
88 // Fixme: implement me
89 throw new NotImplementedException ();
92 public static bool IsCanonicalPixelFormat (PixelFormat pixfmt)
94 // Fixme: implement me
95 throw new NotImplementedException ();
98 public static bool IsExtendedPixelFormat (PixelFormat pixfmt)
100 // Fixme: implement me
101 throw new NotImplementedException ();
105 RectangleF IImage.GetBounds (ref GraphicsUnit pageUnit)
107 // Fixme: implement me
108 throw new NotImplementedException ();
112 int IImage.GetFrameCount (FrameDimension dimension)
114 throw new NotImplementedException ();
118 PropertyItem IImage.GetPropertyItem (int propid)
120 throw new NotImplementedException();
123 void IImage.RemovePropertyItem (int propid)
125 // Fixme: implement me
126 throw new NotImplementedException ();
129 void IImage.RotateFlip (RotateFlipType rotateFlipType)
131 // Fixme: implement me
132 throw new NotImplementedException ();
135 protected InternalImageInfo sourceImageInfo = null;
136 unsafe InternalImageInfo IImage.ConvertToInternalImageInfo ()
139 if (sourceImageInfo == null) {
140 sourceImageInfo = new InternalImageInfo();
141 sourceImageInfo.Size = size;
142 sourceImageInfo.RawFormat = imageFormat;
143 sourceImageInfo.PixelFormat = PixelFormat.Format32bppArgb;
144 sourceImageInfo.Stride = Gdk.Pixbuf.GetRowstride (state);
145 sourceImageInfo.RawImageBytes = new byte[sourceImageInfo.Stride * size.Height];
146 IntPtr memptr = Gdk.Pixbuf.GetPixels (state);
147 Marshal.Copy( memptr, sourceImageInfo.RawImageBytes, 0, sourceImageInfo.RawImageBytes.Length);
148 sourceImageInfo.ChangePixelFormat (pixelFormat);
150 return sourceImageInfo;
153 void IImage.Save (string filename)
155 throw new NotImplementedException ();
159 void IImage.Save(Stream stream, ImageFormat format)
161 throw new NotImplementedException ();
165 void IImage.Save (string filename, ImageFormat format)
167 throw new NotImplementedException ();
171 int IImage.SelectActiveFrame (FrameDimension dimension, int frameIndex)
173 throw new NotImplementedException();
177 void IImage.SetPropertyItem (PropertyItem item)
179 throw new NotImplementedException();
187 throw new NotImplementedException ();
191 Guid [] IImage.FrameDimensionsList {
193 throw new NotImplementedException ();
203 float IImage.HorizontalResolution {
205 throw new NotImplementedException ();
209 ColorPalette IImage.Palette {
211 throw new NotImplementedException ();
214 throw new NotImplementedException ();
218 SizeF IImage.PhysicalDimension {
220 throw new NotImplementedException ();
224 PixelFormat IImage.PixelFormat {
230 int [] IImage.PropertyIdList {
232 throw new NotImplementedException ();
237 PropertyItem [] IImage.PropertyItems {
239 throw new NotImplementedException();
244 ImageFormat IImage.RawFormat {
256 float IImage.VerticalResolution {
258 throw new NotImplementedException ();
269 public void Dispose ()
274 protected virtual void Dispose (bool disposing)
276 throw new NotImplementedException();