Ejemplo n.º 1
0
 public CropMarker(NSView view)
 {
     this.target = view;
     this.setColor(NSColor.BlueColor);
     this.selectedPath = NSBezierPath.BezierPath;
     this.selectedPath.Retain();
     this.selectedRect = NSRect.NSZeroRect;
 }
 public static NSBezierPath ClosedPath(NSBezierPath path)
 {
     if (!IsClosed(path))
     {
         NSBezierPath result = path.Copy<NSBezierPath>();
         result.ClosePath();
         return result;
     }
     return path;
 }
 public static bool IsClosed(NSBezierPath path)
 {
     int elements = path.ElementCount;
     if (elements > 0)
     {
         if (path.ElementAtIndex(path.ElementCount - 1) == NSBezierPathElement.NSClosePathBezierPathElement)
         {
             return true;
         }
     }
     return false;
 }