2 // System.Drawing.Graphics.cs
4 // (C) 2003 Ximian, Inc. http://www.ximian.com
7 // Gonzalo Paniagua Javier (gonzalo@ximian.com) (stubbed out)
8 // Alexandre Pigolkine(pigolkine@gmx.de)
11 using System.Drawing.Drawing2D;
12 using System.Drawing.Imaging;
13 using System.Drawing.Text;
14 using System.Runtime.InteropServices;
16 namespace System.Drawing
19 public sealed class Graphics : MarshalByRefObject, IDisposable
21 internal IntPtr nativeObject = IntPtr.Zero;
23 public delegate bool EnumerateMetafileProc (EmfPlusRecordType recordType,
27 PlayRecordCallback callbackData);
29 public delegate bool DrawImageAbort (IntPtr callbackData);
31 private Graphics (IntPtr nativeGraphics)
33 nativeObject = nativeGraphics;
37 public void AddMetafileComment (byte [] data)
39 throw new NotImplementedException ();
43 public GraphicsContainer BeginContainer ()
45 throw new NotImplementedException ();
49 public GraphicsContainer BeginContainer (Rectangle dstrect, Rectangle srcrect, GraphicsUnit unit)
51 throw new NotImplementedException ();
55 public GraphicsContainer BeginContainer (RectangleF dstrect, RectangleF srcrect, GraphicsUnit unit)
57 throw new NotImplementedException ();
61 public void Clear (Color color)
63 Status status = GDIPlus.GdipGraphicsClear(nativeObject, color.ToArgb());
65 if (status != Status.Ok)
66 throw new Exception ("Error calling GDIPlus.GdipGraphicsClear:" +status);
70 public void Dispose ()
75 public void DrawArc (Pen pen, Rectangle rect, float startAngle, float sweepAngle)
77 DrawArc (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
81 public void DrawArc (Pen pen, RectangleF rect, float startAngle, float sweepAngle)
83 DrawArc (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
87 public void DrawArc (Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
89 GDIPlus.GdipDrawArc (nativeObject, pen.nativeObject,
90 x, y, width, height, startAngle, sweepAngle);
93 public void DrawArc (Pen pen, int x, int y, int width, int height, float startAngle, float sweepAngle)
95 GDIPlus.GdipDrawArcI (nativeObject, pen.nativeObject,
96 x, y, width, height, startAngle, sweepAngle);
99 public void DrawBezier (Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4)
101 GDIPlus.GdipDrawBezier (nativeObject, pen.nativeObject,
102 pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
105 public void DrawBezier (Pen pen, Point pt1, Point pt2, Point pt3, Point pt4)
107 GDIPlus.GdipDrawBezierI (nativeObject, pen.nativeObject,
108 pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
111 public void DrawBezier (Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
113 GDIPlus.GdipDrawBezier (nativeObject, pen.nativeObject, x1, y1, x2, y2, x3, y3, x4, y4);
117 public void DrawBeziers (Pen pen, Point [] points)
119 int length = points.Length;
124 for (int i = 0; i < length; i += 3) {
125 Point p1 = points [i];
126 Point p2 = points [i + 1];
127 Point p3 = points [i + 2];
128 Point p4 = points [i + 3];
130 GDIPlus.GdipDrawBezier (nativeObject, pen.nativeObject,
131 p1.X, p1.Y, p2.X, p2.Y,
132 p3.X, p3.Y, p4.X, p4.Y);
137 public void DrawBeziers (Pen pen, PointF [] points)
139 int length = points.Length;
144 for (int i = 0; i < length; i += 3) {
145 PointF p1 = points [i];
146 PointF p2 = points [i + 1];
147 PointF p3 = points [i + 2];
148 PointF p4 = points [i + 3];
150 GDIPlus.GdipDrawBezier (nativeObject, pen.nativeObject,
151 p1.X, p1.Y, p2.X, p2.Y,
152 p3.X, p3.Y, p4.X, p4.Y);
157 public void DrawClosedCurve (Pen pen, PointF [] points)
159 throw new NotImplementedException ();
163 public void DrawClosedCurve (Pen pen, Point [] points)
165 throw new NotImplementedException ();
169 public void DrawClosedCurve (Pen pen, Point [] points, float tension, FillMode fillmode)
171 throw new NotImplementedException ();
175 public void DrawClosedCurve (Pen pen, PointF [] points, float tension, FillMode fillmode)
177 throw new NotImplementedException ();
181 public void DrawCurve (Pen pen, Point [] points)
183 throw new NotImplementedException ();
187 public void DrawCurve (Pen pen, PointF [] points)
189 throw new NotImplementedException ();
193 public void DrawCurve (Pen pen, PointF [] points, float tension)
195 throw new NotImplementedException ();
199 public void DrawCurve (Pen pen, Point [] points, float tension)
201 throw new NotImplementedException ();
205 public void DrawCurve (Pen pen, PointF [] points, int offset, int numberOfSegments)
207 throw new NotImplementedException ();
211 public void DrawCurve (Pen pen, Point [] points, int offset, int numberOfSegments, float tension)
213 throw new NotImplementedException ();
217 public void DrawCurve (Pen pen, PointF [] points, int offset, int numberOfSegments, float tension)
219 throw new NotImplementedException ();
222 public void DrawEllipse (Pen pen, Rectangle rect)
224 DrawEllipse (pen, rect.X, rect.Y, rect.Width, rect.Height);
227 public void DrawEllipse (Pen pen, RectangleF rect)
229 DrawEllipse (pen, rect.X, rect.Y, rect.Width, rect.Height);
232 public void DrawEllipse (Pen pen, int x, int y, int width, int height)
234 GDIPlus.GdipDrawEllipseI (nativeObject, pen.nativeObject, x, y, width, height);
237 public void DrawEllipse (Pen pen, float x, float y, float width, float height)
239 GDIPlus.GdipDrawEllipse (nativeObject, pen.nativeObject, x, y, width, height);
243 public void DrawIcon (Icon icon, Rectangle targetRect)
245 throw new NotImplementedException ();
249 public void DrawIcon (Icon icon, int x, int y)
251 throw new NotImplementedException ();
255 public void DrawIconUnstretched (Icon icon, Rectangle targetRect)
257 throw new NotImplementedException ();
261 public void DrawImage (Image image, RectangleF rect)
263 throw new NotImplementedException ();
267 public void DrawImage (Image image, PointF point)
269 Status status = GDIPlus.GdipDrawImage(nativeObject, image.NativeObject, point.X, point.Y);
271 if (status != Status.Ok)
272 throw new Exception ("Error calling GDIPlus.DrawImage (Image image, PointF point):" +status);
276 public void DrawImage (Image image, Point [] destPoints)
278 throw new NotImplementedException ();
282 public void DrawImage (Image image, Point point)
284 throw new NotImplementedException ();
288 public void DrawImage (Image image, Rectangle rect)
290 throw new NotImplementedException ();
294 public void DrawImage (Image image, PointF [] destPoints)
296 throw new NotImplementedException ();
300 public void DrawImage (Image image, int x, int y)
302 throw new NotImplementedException ();
306 public void DrawImage (Image image, float x, float y)
308 throw new NotImplementedException ();
312 public void DrawImage (Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit)
314 throw new NotImplementedException ();
318 public void DrawImage (Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit)
320 throw new NotImplementedException ();
324 public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit)
326 throw new NotImplementedException ();
330 public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit)
332 throw new NotImplementedException ();
336 public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr)
338 throw new NotImplementedException ();
342 public void DrawImage (Image image, float x, float y, float width, float height)
344 throw new NotImplementedException ();
348 public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr)
350 throw new NotImplementedException ();
354 public void DrawImage (Image image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit)
356 throw new NotImplementedException ();
360 public void DrawImage (Image image, int x, int y, int width, int height)
362 GDIPlus.GdipDrawImageRectI (nativeObject, image.nativeObject, x, y, width, height);
366 public void DrawImage (Image image, float x, float y, RectangleF srcRect, GraphicsUnit srcUnit)
368 throw new NotImplementedException ();
372 public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
374 throw new NotImplementedException ();
378 public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
380 throw new NotImplementedException ();
384 public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData)
386 throw new NotImplementedException ();
390 public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit)
392 throw new NotImplementedException ();
396 public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData)
398 throw new NotImplementedException ();
402 public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit)
404 throw new NotImplementedException ();
408 public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs)
410 throw new NotImplementedException ();
413 public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr)
415 Status status = GDIPlus.GdipDrawImageRectRectI(nativeObject, image.NativeObject, //aki
416 destRect.X, destRect.Y, destRect.Width, destRect.Height,
417 srcX, srcY, srcWidth, srcHeight,
418 srcUnit, imageAttr.NativeObject, IntPtr.Zero, 0);
420 if (status != Status.Ok)
421 throw new Exception ("Error calling GDIPlus.DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr)" +status);
425 public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
427 throw new NotImplementedException ();
431 public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback)
433 throw new NotImplementedException ();
437 public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData)
439 throw new NotImplementedException ();
443 public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData)
445 throw new NotImplementedException ();
449 public void DrawImageUnscaled (Image image, Point point)
451 throw new NotImplementedException ();
455 public void DrawImageUnscaled (Image image, Rectangle rect)
457 throw new NotImplementedException ();
461 public void DrawImageUnscaled (Image image, int x, int y)
463 throw new NotImplementedException ();
467 public void DrawImageUnscaled (Image image, int x, int y, int width, int height)
469 throw new NotImplementedException ();
472 public void DrawLine (Pen pen, PointF pt1, PointF pt2)
474 GDIPlus.GdipDrawLine (
475 nativeObject, pen.nativeObject,
480 public void DrawLine (Pen pen, Point pt1, Point pt2)
482 GDIPlus.GdipDrawLine (
483 nativeObject, pen.nativeObject,
488 public void DrawLine (Pen pen, int x1, int y1, int x2, int y2)
490 GDIPlus.GdipDrawLineI (nativeObject, pen.nativeObject, x1, y1, x2, y2);
493 public void DrawLine (Pen pen, float x1, float y1, float x2, float y2)
495 GDIPlus.GdipDrawLine (nativeObject, pen.nativeObject, x1, y1, x2, y2);
498 public void DrawLines (Pen pen, PointF [] points)
500 GDIPlus.GdipDrawLines (nativeObject, pen.nativeObject, points, points.Length);
503 public void DrawLines (Pen pen, Point [] points)
505 GDIPlus.GdipDrawLinesI (nativeObject, pen.nativeObject, points, points.Length);
509 public void DrawPath (Pen pen, GraphicsPath path)
511 throw new NotImplementedException ();
515 public void DrawPie (Pen pen, Rectangle rect, float startAngle, float sweepAngle)
517 DrawPie (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
521 public void DrawPie (Pen pen, RectangleF rect, float startAngle, float sweepAngle)
523 DrawPie (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
527 public void DrawPie (Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
529 GDIPlus.GdipDrawPie (nativeObject, pen.nativeObject, x, y, width, height, startAngle, sweepAngle);
533 public void DrawPie (Pen pen, int x, int y, int width, int height, float startAngle, float sweepAngle)
535 GDIPlus.GdipDrawPieI (nativeObject, pen.nativeObject, x, y, width, height, startAngle, sweepAngle);
538 public void DrawPolygon (Pen pen, Point [] points)
540 GDIPlus.GdipDrawPolygonI (nativeObject, pen.nativeObject, points, points.Length);
543 public void DrawPolygon (Pen pen, PointF [] points)
545 GDIPlus.GdipDrawPolygon (nativeObject, pen.nativeObject, points, points.Length);
548 public void DrawRectangle (Pen pen, RectangleF rect)
550 DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height);
553 public void DrawRectangle (Pen pen, Rectangle rect)
555 DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height);
558 public void DrawRectangle (Pen pen, float x, float y, float width, float height)
560 GDIPlus.GdipDrawRectangle (nativeObject, pen.nativeObject, x, y, width, height);
563 public void DrawRectangle (Pen pen, int x, int y, int width, int height)
565 GDIPlus.GdipDrawRectangleI (nativeObject, pen.nativeObject, x, y, width, height);
568 public void DrawRectangles (Pen pen, RectangleF [] rects)
570 foreach (RectangleF rc in rects)
571 DrawRectangle (pen, rc.Left, rc.Top, rc.Width, rc.Height);
574 public void DrawRectangles (Pen pen, Rectangle [] rects)
576 foreach (RectangleF rc in rects)
577 DrawRectangle(pen, rc.Left, rc.Top, rc.Width, rc.Height);
580 [MonoTODO("Ignores the font")]
581 public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle)
583 GDIPlus.GdipDrawString (nativeObject, s, s.Length, IntPtr.Zero, ref layoutRectangle, IntPtr.Zero, brush.nativeObject);
586 [MonoTODO("This ignores the font")]
587 public void DrawString (string s, Font font, Brush brush, PointF point)
589 RectangleF rc = new RectangleF (point.X, point.Y, 0, 0);
590 GDIPlus.GdipDrawString (nativeObject, s, s.Length, IntPtr.Zero, ref rc, IntPtr.Zero, brush.nativeObject);
593 [MonoTODO ("This ignores the font and format")]
594 public void DrawString (string s, Font font, Brush brush, PointF point, StringFormat format)
596 RectangleF rc = new RectangleF (point.X, point.Y, 0, 0);
597 GDIPlus.GdipDrawString (nativeObject, s, s.Length, IntPtr.Zero, ref rc, IntPtr.Zero, brush.nativeObject);
600 [MonoTODO ("This ignores the font and the format")]
601 public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
603 GDIPlus.GdipDrawString (nativeObject, s, s.Length, IntPtr.Zero, ref layoutRectangle, IntPtr.Zero, brush.nativeObject);
606 [MonoTODO("This ignores the font")]
607 public void DrawString (string s, Font font, Brush brush, float x, float y)
609 Console.WriteLine("DrawString!");
610 RectangleF rc = new RectangleF (x, y, 0, 0);
612 Status status = GDIPlus.GdipDrawString (nativeObject, s, s.Length, IntPtr.Zero,
613 ref rc, IntPtr.Zero, brush.nativeObject);
615 if (status != Status.Ok)
616 throw new Exception ("Error calling GDIPlus.GdipDrawString(string s, Font font, Brush brush, float x, float y):" +s);
620 public void DrawString (string s, Font font, Brush brush, float x, float y, StringFormat format)
622 //throw new NotImplementedException ();
626 public void EndContainer (GraphicsContainer container)
628 throw new NotImplementedException ();
632 public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback)
634 throw new NotImplementedException ();
638 public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback)
640 throw new NotImplementedException ();
644 public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback)
646 throw new NotImplementedException ();
650 public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback)
652 throw new NotImplementedException ();
656 public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback)
658 throw new NotImplementedException ();
662 public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback)
664 throw new NotImplementedException ();
668 public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData)
670 throw new NotImplementedException ();
674 public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData)
676 throw new NotImplementedException ();
680 public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData)
682 throw new NotImplementedException ();
686 public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData)
688 throw new NotImplementedException ();
692 public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData)
694 throw new NotImplementedException ();
698 public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData)
700 throw new NotImplementedException ();
704 public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
706 throw new NotImplementedException ();
710 public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
712 throw new NotImplementedException ();
716 public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
718 throw new NotImplementedException ();
722 public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
724 throw new NotImplementedException ();
728 public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
730 throw new NotImplementedException ();
734 public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
736 throw new NotImplementedException ();
740 public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
742 throw new NotImplementedException ();
746 public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
748 throw new NotImplementedException ();
752 public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
754 throw new NotImplementedException ();
758 public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
760 throw new NotImplementedException ();
764 public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
766 throw new NotImplementedException ();
770 public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
772 throw new NotImplementedException ();
776 public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
778 throw new NotImplementedException ();
782 public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
784 throw new NotImplementedException ();
788 public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
790 throw new NotImplementedException ();
794 public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
796 throw new NotImplementedException ();
800 public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
802 throw new NotImplementedException ();
806 public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
808 throw new NotImplementedException ();
812 public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
814 throw new NotImplementedException ();
818 public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
820 throw new NotImplementedException ();
824 public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
826 throw new NotImplementedException ();
830 public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
832 throw new NotImplementedException ();
836 public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
838 throw new NotImplementedException ();
842 public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
844 throw new NotImplementedException ();
848 public void ExcludeClip (Rectangle rect)
850 throw new NotImplementedException ();
854 public void ExcludeClip (Region region)
856 throw new NotImplementedException ();
860 public void FillClosedCurve (Brush brush, PointF [] points)
862 throw new NotImplementedException ();
866 public void FillClosedCurve (Brush brush, Point [] points)
868 throw new NotImplementedException ();
872 public void FillClosedCurve (Brush brush, PointF [] points, FillMode fillmode)
874 throw new NotImplementedException ();
878 public void FillClosedCurve (Brush brush, Point [] points, FillMode fillmode)
880 throw new NotImplementedException ();
884 public void FillClosedCurve (Brush brush, PointF [] points, FillMode fillmode, float tension)
886 throw new NotImplementedException ();
890 public void FillClosedCurve (Brush brush, Point [] points, FillMode fillmode, float tension)
892 throw new NotImplementedException ();
895 public void FillEllipse (Brush brush, Rectangle rect)
897 FillEllipse (brush, rect.X, rect.Y, rect.Width, rect.Height);
900 public void FillEllipse (Brush brush, RectangleF rect)
902 FillEllipse (brush, rect.X, rect.Y, rect.Width, rect.Height);
905 public void FillEllipse (Brush brush, float x, float y, float width, float height)
907 GDIPlus.GdipFillEllipse (nativeObject, brush.nativeObject, x, y, width, height);
910 public void FillEllipse (Brush brush, int x, int y, int width, int height)
912 GDIPlus.GdipFillEllipseI (nativeObject, brush.nativeObject, x, y, width, height);
916 public void FillPath (Brush brush, GraphicsPath path)
918 throw new NotImplementedException ();
922 public void FillPie (Brush brush, Rectangle rect, float startAngle, float sweepAngle)
924 throw new NotImplementedException ();
928 public void FillPie (Brush brush, int x, int y, int width, int height, int startAngle, int sweepAngle)
930 throw new NotImplementedException ();
934 public void FillPie (Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
936 throw new NotImplementedException ();
939 public void FillPolygon (Brush brush, PointF [] points)
941 GDIPlus.GdipFillPolygon2 (nativeObject, brush.nativeObject, points, points.Length);
944 public void FillPolygon (Brush brush, Point [] points)
946 GDIPlus.GdipFillPolygon2I (nativeObject, brush.nativeObject, points, points.Length);
949 public void FillPolygon (Brush brush, Point [] points, FillMode fillMode)
951 GDIPlus.GdipFillPolygonI (nativeObject, brush.nativeObject, points, points.Length, fillMode);
954 public void FillPolygon (Brush brush, PointF [] points, FillMode fillMode)
956 GDIPlus.GdipFillPolygon (nativeObject, brush.nativeObject, points, points.Length, fillMode);
959 public void FillRectangle (Brush brush, RectangleF rect)
961 FillRectangle (brush, rect.Left, rect.Top, rect.Width, rect.Height);
964 public void FillRectangle (Brush brush, Rectangle rect)
966 FillRectangle (brush, rect.Left, rect.Top, rect.Width, rect.Height);
969 public void FillRectangle (Brush brush, int x, int y, int width, int height)
971 GDIPlus.GdipFillRectangle (nativeObject, brush.nativeObject, (float)x, (float)y, (float)width, (float)height);
974 public void FillRectangle (Brush brush, float x, float y, float width, float height)
976 GDIPlus.GdipFillRectangle (nativeObject, brush.nativeObject, x, y, width, height);
979 public void FillRectangles (Brush brush, Rectangle [] rects)
981 foreach (Rectangle rc in rects)
982 FillRectangle(brush, rc);
985 public void FillRectangles (Brush brush, RectangleF [] rects)
987 foreach (RectangleF rc in rects)
988 FillRectangle(brush, rc);
992 public void FillRegion (Brush brush, Region region)
994 throw new NotImplementedException ();
1000 Flush(FlushIntention.Flush);
1004 public void Flush (FlushIntention intention)
1006 throw new NotImplementedException ();
1010 public static Graphics FromHdc (IntPtr hdc)
1013 GDIPlus.GdipCreateFromHDC (hdc, out graphics);
1014 Graphics result = new Graphics ((IntPtr)graphics);
1019 public static Graphics FromHdc (IntPtr hdc, IntPtr hdevice)
1021 throw new NotImplementedException ();
1025 public static Graphics FromHdcInternal (IntPtr hdc)
1027 throw new NotImplementedException ();
1031 public static Graphics FromHwnd (IntPtr hwnd)
1033 Graphics result = new Graphics(IntPtr.Zero);
1038 public static Graphics FromHwndInternal (IntPtr hwnd)
1040 throw new NotImplementedException ();
1044 public static Graphics FromImage (Image image)
1046 if (image == null) throw new ArgumentException ();
1048 GDIPlus.GdipGetImageGraphicsContext (image.nativeObject, out graphics);
1049 Graphics result = new Graphics ((IntPtr)graphics);
1054 public static IntPtr GetHalftonePalette ()
1056 throw new NotImplementedException ();
1060 public IntPtr GetHdc ()
1063 GDIPlus.GdipGetDC (nativeObject, out hdc);
1068 public Color GetNearestColor (Color color)
1070 throw new NotImplementedException ();
1074 public void IntersectClip (Region region)
1076 throw new NotImplementedException ();
1080 public void IntersectClip (RectangleF rect)
1082 throw new NotImplementedException ();
1086 public void IntersectClip (Rectangle rect)
1088 throw new NotImplementedException ();
1092 public bool IsVisible (Point point)
1094 throw new NotImplementedException ();
1098 public bool IsVisible (RectangleF rect)
1100 throw new NotImplementedException ();
1104 public bool IsVisible (PointF point)
1106 throw new NotImplementedException ();
1110 public bool IsVisible (Rectangle rect)
1112 throw new NotImplementedException ();
1116 public bool IsVisible (float x, float y)
1118 throw new NotImplementedException ();
1122 public bool IsVisible (int x, int y)
1124 throw new NotImplementedException ();
1128 public bool IsVisible (float x, float y, float width, float height)
1130 throw new NotImplementedException ();
1134 public bool IsVisible (int x, int y, int width, int height)
1136 throw new NotImplementedException ();
1140 public Region [] MeasureCharacterRanges (string text, Font font, RectangleF layoutRect, StringFormat stringFormat)
1142 throw new NotImplementedException ();
1146 public SizeF MeasureString (string text, Font font)
1148 throw new NotImplementedException ();
1152 public SizeF MeasureString (string text, Font font, SizeF layoutArea)
1154 throw new NotImplementedException ();
1158 public SizeF MeasureString (string text, Font font, int width)
1160 throw new NotImplementedException ();
1164 public SizeF MeasureString (string text, Font font, SizeF layoutArea, StringFormat stringFormat)
1166 throw new NotImplementedException ();
1170 public SizeF MeasureString (string text, Font font, int width, StringFormat format)
1172 throw new NotImplementedException ();
1176 public SizeF MeasureString (string text, Font font, PointF origin, StringFormat stringFormat)
1178 throw new NotImplementedException ();
1182 public SizeF MeasureString (string text, Font font, SizeF layoutArea, StringFormat stringFormat, out int charactersFitted, out int linesFilled)
1184 throw new NotImplementedException ();
1187 public void MultiplyTransform (Matrix matrix)
1189 MultiplyTransform (matrix, MatrixOrder.Prepend);
1192 public void MultiplyTransform (Matrix matrix, MatrixOrder order)
1194 GDIPlus.GdipMultiplyWorldTransform (nativeObject, matrix.nativeMatrix, order);
1198 public void ReleaseHdc (IntPtr hdc)
1200 GDIPlus.GdipReleaseDC (nativeObject, hdc);
1204 public void ReleaseHdcInternal (IntPtr hdc)
1206 throw new NotImplementedException ();
1210 public void ResetClip ()
1212 throw new NotImplementedException ();
1215 public void ResetTransform ()
1217 GDIPlus.GdipResetWorldTransform (nativeObject);
1221 public void Restore (GraphicsState gstate)
1223 Transform = gstate.matrix.Clone();
1224 GDIPlus.GdipRestoreGraphics (nativeObject, gstate.nativeState);
1228 public void RotateTransform (float angle)
1230 RotateTransform(angle, MatrixOrder.Prepend);
1234 public void RotateTransform (float angle, MatrixOrder order)
1236 //transform.Rotate(angle, order);
1237 GDIPlus.GdipRotateWorldTransform (nativeObject, angle, order);
1241 public GraphicsState Save ()
1243 //return implementation.Save();
1244 GraphicsState state = new GraphicsState();
1245 state.matrix = Transform.Clone();
1247 GDIPlus.GdipSaveGraphics (nativeObject, out saveState);
1248 state.nativeState = saveState;
1252 public void ScaleTransform (float sx, float sy)
1254 ScaleTransform (sx, sy, MatrixOrder.Prepend);
1257 public void ScaleTransform (float sx, float sy, MatrixOrder order)
1259 GDIPlus.GdipScaleWorldTransform (nativeObject, sx, sy, order);
1263 public void SetClip (RectangleF rect)
1265 throw new NotImplementedException ();
1269 public void SetClip (GraphicsPath path)
1271 throw new NotImplementedException ();
1275 public void SetClip (Rectangle rect)
1277 throw new NotImplementedException ();
1281 public void SetClip (Graphics g)
1283 throw new NotImplementedException ();
1287 public void SetClip (Graphics g, CombineMode combineMode)
1289 throw new NotImplementedException ();
1293 public void SetClip (Rectangle rect, CombineMode combineMode)
1295 throw new NotImplementedException ();
1299 public void SetClip (RectangleF rect, CombineMode combineMode)
1301 throw new NotImplementedException ();
1305 public void SetClip (Region region, CombineMode combineMode)
1307 throw new NotImplementedException ();
1311 public void SetClip (GraphicsPath path, CombineMode combineMode)
1313 throw new NotImplementedException ();
1317 public void TransformPoints (CoordinateSpace destSpace, CoordinateSpace srcSpace, PointF [] pts)
1319 throw new NotImplementedException ();
1323 public void TransformPoints (CoordinateSpace destSpace, CoordinateSpace srcSpace, Point [] pts)
1325 throw new NotImplementedException ();
1329 public void TranslateClip (int dx, int dy)
1331 throw new NotImplementedException ();
1335 public void TranslateClip (float dx, float dy)
1337 throw new NotImplementedException ();
1340 public void TranslateTransform (float dx, float dy)
1342 TranslateTransform (dx, dy, MatrixOrder.Prepend);
1346 public void TranslateTransform (float dx, float dy, MatrixOrder order)
1348 //transform.Translate(dx, dy, order);
1349 GDIPlus.GdipTranslateWorldTransform (nativeObject, dx, dy, order);
1352 public Region Clip {
1354 throw new NotImplementedException ();
1357 //throw new NotImplementedException ();
1361 public RectangleF ClipBounds {
1363 throw new NotImplementedException ();
1367 public CompositingMode CompositingMode {
1369 throw new NotImplementedException ();
1372 throw new NotImplementedException ();
1377 public CompositingQuality CompositingQuality {
1379 throw new NotImplementedException ();
1382 throw new NotImplementedException ();
1388 throw new NotImplementedException ();
1394 throw new NotImplementedException ();
1398 public InterpolationMode InterpolationMode {
1400 throw new NotImplementedException ();
1403 throw new NotImplementedException ();
1407 public bool IsClipEmpty {
1409 throw new NotImplementedException ();
1413 public bool IsVisibleClipEmpty {
1415 throw new NotImplementedException ();
1419 public float PageScale {
1421 throw new NotImplementedException ();
1424 throw new NotImplementedException ();
1428 public GraphicsUnit PageUnit {
1430 throw new NotImplementedException ();
1433 throw new NotImplementedException ();
1437 public PixelOffsetMode PixelOffsetMode {
1439 throw new NotImplementedException ();
1442 throw new NotImplementedException ();
1446 public Point RenderingOrigin {
1449 GDIPlus.GdipGetRenderingOrigin (
1450 nativeObject, out x, out y);
1452 return new Point (x, y);
1456 GDIPlus.GdipSetRenderingOrigin (nativeObject, value.X, value.Y);
1460 public SmoothingMode SmoothingMode {
1462 throw new NotImplementedException ();
1465 throw new NotImplementedException ();
1469 public int TextContrast {
1471 throw new NotImplementedException ();
1474 throw new NotImplementedException ();
1478 public TextRenderingHint TextRenderingHint {
1480 throw new NotImplementedException ();
1483 throw new NotImplementedException ();
1487 public Matrix Transform {
1489 Matrix matrix = new Matrix ();
1490 GDIPlus.GdipGetWorldTransform (nativeObject, matrix.nativeMatrix);
1495 GDIPlus.GdipSetWorldTransform (nativeObject, value.nativeMatrix);
1499 public RectangleF VisibleClipBounds {
1501 throw new NotImplementedException ();