[Mono-bugs] [Bug 81030][Nor] New - Missing drawing functionality

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Mar 3 21:15:44 EST 2007


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

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

--- shadow/81030	2007-03-03 21:15:44.000000000 -0500
+++ shadow/81030.tmp.25668	2007-03-03 21:15:44.000000000 -0500
@@ -0,0 +1,56 @@
+Bug#: 81030
+Product: Cocoa#
+Version: unspecified
+OS: Mac OS X 10.3
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Bindings.
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: schaveyt at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Missing drawing functionality
+
+In the lastest code set of CocoaSharp, the current Color class found in the
+Cocoa folder lacks a number of fundamental function required for drawing in
+Cocoa views. Below in the patch I created for the class containing the
+enhancement I've made:
+
+<pre>
+Index: Color.cs
+===================================================================
+--- Color.cs	(revision 72210)
++++ Color.cs	(working copy)
+@@ -114,5 +114,21 @@
+ 		public Color ToRGB () {
+ 			return (Color) Object.FromIntPtr ((IntPtr)ObjCMessaging.objc_msgSend
+(NativeObject, "colorUsingColorSpaceName:", typeof (IntPtr), typeof
+(IntPtr), new Cocoa.String ("NSDeviceRGBColorSpace").NativeObject));
+ 		}
++        
++        public void Set(){
++            ObjCMessaging.objc_msgSend (NativeObject, "set", typeof (void));
++        }
++        
++        public void SetFill(){
++            ObjCMessaging.objc_msgSend (NativeObject, "setFill", typeof
+(void));
++        }
++        
++        public void SetStroke(){
++            ObjCMessaging.objc_msgSend (NativeObject, "setStroke", typeof
+(void));
++        }
++        
++        public void DrawSwatchInRect( Rect rect ){
++            ObjCMessaging.objc_msgSend (NativeObject, "drawSwatchInRect:",
+typeof (void), typeof (Rect), rect);
++        }
+ 	}
+ }
+</pre>


More information about the mono-bugs mailing list