[Mono-bugs] [Bug 360808] [OSX] Graphics contexts that do not call Dispose are not immediately drawn to the screen

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 14 14:02:28 EST 2008


User gnorton at novell.com added comment

Geoff Norton <gnorton at novell.com> changed:

           What    |Removed                                         |Added
                 CC|                                                |gnorton at novell.com
            Summary|Can't draw polygon                              |[OSX] Graphics contexts that do not call Dispose
                   |                                                |are not immediately drawn to the screen

--- Comment #1 from Geoff Norton <gnorton at novell.com>  2008-02-14 12:02:28 MST ---
This bug is going to be difficult to fix (if at all possible).  The issue is
that this demo creates graphics contexts and expects the results to be
implicitly flushed to the screen in real time which we cannot do on the mac for
a number of reasons.  They dont Dispose their context, and rely on the GC to do
that for them which isn't guaranteed in any amount of time.  The following

=== PolygonCuttingEarInterface/frmCuttingEars.cs
--- PolygonCuttingEarInterface/frmCuttingEars.cs        (revision 90096)
+++ PolygonCuttingEarInterface/frmCuttingEars.cs        (local)
@@ -654,6 +654,7 @@
                                //fill triangles in different color
                                int nBrush = i % 3;
                                gfx.FillPolygon(m_aBrushes[nBrush], tempArray);
+                               gfx.Dispose ();
@@ -678,6 +679,7 @@
+                                       gfx.Dispose ();
@@ -727,6 +729,7 @@
                        startPt=new Point(x,y-2);
                        endPt=new Point(x,y+2);
                        gfx.DrawLine(Pens.Red,startPt, endPt);
+                       gfx.Dispose ();

Fixes this problem by following good standards for MWF apps.  

I'll leave this bug open and rewrite its summary for information purposes for

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list