[Mono-bugs] [Bug 76902][Wis] Changed - Graphics.BeginContainer() raises NotImplementedException

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed May 3 16:48:02 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76902

--- shadow/76902	2006-05-02 12:02:25.000000000 -0400
+++ shadow/76902.tmp.22064	2006-05-03 16:48:02.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 76902
 Product: Mono: Class Libraries
 Version: 1.1
 OS: unknown
 OS Details: 
-Status: NEW   
+Status: ASSIGNED   
 Resolution: 
 Severity: Unknown
 Priority: Wishlist
 Component: libgdiplus
 AssignedTo: sebastien at ximian.com                            
 ReportedBy: atsushi at ximian.com               
@@ -78,6 +78,31 @@
 instead of extra busy graduating student.
 
 ------- Additional Comments From sebastien at ximian.com  2006-05-02 12:02 -------
 The basic case for BeginContainer|EndContainer is in SVN
 (r60177-r60180). Keeping open for the cases where rectangles and unit
 are used to affect the scale.
+
+------- Additional Comments From sebastien at ximian.com  2006-05-03 16:48 -------
+Yuck, the effective world transform, inside a container, is different
+from current Graphics.Transform (which means it's hidden API wise).
+
+more information:
+http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/usingGDIPlus/usinggraphicscontainers/nestedgraphicscontainers.asp
+
+private void Form1_Paint (object sender, PaintEventArgs e)
+{
+	e.Graphics.TranslateTransform (100, 80);
+
+	GraphicsContainer gc = e.Graphics.BeginContainer ();
+	e.Graphics.RotateTransform (30);
+	e.Graphics.DrawRectangle (Pens.Red, -60, -30, 120, 60);
+
+	GraphicsContainer gc2 = e.Graphics.BeginContainer ();
+	e.Graphics.ScaleTransform (0.5f, 0.5f);
+	e.Graphics.DrawRectangle (Pens.Green, -60, -30, 120, 60);
+
+	e.Graphics.EndContainer (gc2);
+	e.Graphics.EndContainer (gc);
+
+	e.Graphics.DrawRectangle (Pens.Blue, -60, -30, 120, 60);
+}


More information about the mono-bugs mailing list