public void ResetClip(object backend) { var path = new NSBezierPath(); path.AppendPathWithRect(new System.Drawing.RectangleF(0, 0, float.MaxValue, float.MaxValue)); path.SetClip(); }
public override void DrawRect(CGRect dirtyRect) { CGContext context = NSGraphicsContext.CurrentContext.GraphicsPort; context.SetFillColor(__BackgroundColor); context.FillRect(dirtyRect); base.DrawRect(dirtyRect); if (BorderLineWidth > 0) { NSBezierPath bounds = new NSBezierPath(); bounds.AppendPathWithRect(dirtyRect); bounds.AddClip(); bounds.LineWidth = BorderLineWidth; if (BorderColor != null) { BorderColor.SetStroke(); } bounds.Stroke(); } }
public override void DrawRect(CGRect dirtyRect) { base.DrawRect(dirtyRect); if (!Selected) { return; } NSBezierPath path = new NSBezierPath(); path.AppendPathWithRect(new CGRect(Bounds.X, Bounds.Height - 2, Bounds.Width, 2)); (Selected ? NSColor.Text : NSColor.DisabledControlText).Set(); path.Fill(); }
public override void DrawRect(CGRect dirtyRect) { var path = new NSBezierPath (); path.AppendPathWithRect (dirtyRect); NSColor.Clear.SetFill (); path.Fill (); path.AppendPathWithRect (highlightRect); NSColor.Red.SetStroke (); path.Stroke (); }