[Mono-bugs] [Bug 75028][Wis] Changed - Cairo graphics class should have virtual functions

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon May 23 16:40:17 EDT 2005


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 adam.lofts at gmail.com.

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

--- shadow/75028	2005-05-23 13:12:33.000000000 -0400
+++ shadow/75028.tmp.3815	2005-05-23 16:40:17.000000000 -0400
@@ -53,6 +53,31 @@
 back in another" issues. Thus, it's important we seal the class to
 make it clear that we do not deal with, and never want to deal with,
 such issues.
 
 Also, overriding a function in managed code won't affect unmanaged
 calls. So you aren't really making things virtual.
+
+------- Additional Comments From adam.lofts at gmail.com  2005-05-23 16:40 -------
+> If we allow subclassing of the Graphics, we will get into nasty issues
+> like "what if I pass a graphics to native code in one place and get it
+> back in another" issues.
+
+Doesn't this apply to any class wrapping unmanaged code? When will
+anyone pass an overridden graphics object to unmanaged code (and then
+get it back) ? I could use the same argument to make Gtk.TextView sealed.
+
+The only places i get a graphics object are from calls like
+Window.GetGraphics () (i.e. Creation of a graphics object) - which
+will obviously never return a class derived from Graphics.
+
+> Also, overriding a function in managed code won't affect unmanaged
+> calls. So you aren't really making things virtual.
+
+Most of the functions would never call another function within the
+Graphics class. Noone expects overriding Cairo.TransformPoint to
+change how Cairo draws graphics (or maybe they would ?). If Cairo gets
+gobject-ified (as there has been discussion) then of course this sort
+of thing might work!.
+
+Anyhow, I'm not really too bothered. It just makes my code a bit more
+messy. It should be either sealed or virtual. You choose.


More information about the mono-bugs mailing list