Author: schaveyt
Date: 2007-03-11 21:46:50 -0500 (Sun, 11 Mar 2007)
New Revision: 74087

Modified:
   trunk/cocoa-sharp/src/Cocoa/BezierPath.cs
Log:
Added enumerations for drawing, added StrokeRect method as well as some 
documenation


Modified: trunk/cocoa-sharp/src/Cocoa/BezierPath.cs
===================================================================
--- trunk/cocoa-sharp/src/Cocoa/BezierPath.cs   2007-03-12 02:41:27 UTC (rev 
74086)
+++ trunk/cocoa-sharp/src/Cocoa/BezierPath.cs   2007-03-12 02:46:50 UTC (rev 
74087)
@@ -2,13 +2,79 @@
 using System.Runtime.InteropServices;
 using Cocoa;
 
-namespace Cocoa {
-       public class BezierPath : Cocoa.Object {
-               private static string ObjectiveCName = "NSBezierPath";          
                                                                            
-               public BezierPath (IntPtr native_object) : base (native_object) 
{}
-               
-               public static void FillRect (Rect bounds) {
-                       ObjCMessaging.objc_msgSend ((IntPtr) ObjCClass.FromType 
(typeof (BezierPath)).ToIntPtr (), "fillRect:", typeof (void), typeof (Rect), 
bounds);
-               }
-       }
+namespace Cocoa 
+{    
+       public class BezierPath : Cocoa.Object 
+    {
+        enum LineCapStyle 
+        {
+            ButtLine = 0,
+            RoundLine = 1,
+            SquareLine = 2
+        }
+
+        enum LineJoinStyle
+        {
+            Miter = 0,
+            Round = 1,
+            Bevel = 2
+        }
+
+        enum WindingRule
+        {
+            NonZero = 0,
+            EvenOdd = 1
+        }
+
+        enum BezierPathElement
+        {
+            MoveTo,
+            LineTo,
+            CurveTo,
+            ClosePath
+        }
+
+        private static string ObjectiveCName = "NSBezierPath";       
+
+        /// <summary>
+        /// Default Constructor
+        /// </summary>
+        /// <param name="native_object"></param>
+        public BezierPath (IntPtr native_object) 
+        : base (native_object)
+        {
+        }
+
+        /// <summary>
+        /// Fills the specified rectangular path with the current fill color.
+        /// </summary>
+        /// <remarks>
+        /// This method fills the specified region immediately. This method 
uses the compositing
+        /// operation returned by the compositingOperation method of 
NSGraphicsContext.
+        /// </remarks>
+        /// <param name="bounds">
+        /// A rectangle in the current coordinate system.
+        /// </param> 
+        public static void FillRect (Rect bounds) 
+        {
+            ObjCMessaging.objc_msgSend ((IntPtr) ObjCClass.FromType (typeof 
(BezierPath)).ToIntPtr (), 
+                                        "fillRect:", typeof (void), typeof 
(Rect), bounds);
+        }
+
+        /// <summary>
+        /// Strokes the path of the specified rectangle using the current 
stroke color and the default drawing attributes
+        /// </summary>
+        /// <remarks>
+        /// The path is drawn beginning at the rectangle�s origin and 
proceeding in a
+        /// counterclockwise direction. This method strokes the specified path 
immediately.
+        /// </remarks>
+        /// <param name="bounds">
+        /// A rectangle in the current coordinate system.
+        /// </param> 
+        public static void StrokeRect (Rect bounds) 
+        {
+            ObjCMessaging.objc_msgSend ((IntPtr) ObjCClass.FromType (typeof 
(BezierPath)).ToIntPtr (), 
+                                        "strokeRect:", typeof (void), typeof 
(Rect), bounds);
+        }
+    }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to