AdvancedColorPicker.SatBrightIndicatorView.Draw C# (CSharp) Method

Draw() public method

public Draw ( RectangleF rect ) : void
rect System.Drawing.RectangleF
return void
        public override void Draw(RectangleF rect)
        {
            base.Draw (rect);

            float margins = 4;
            RectangleF drawRect = new RectangleF(rect.X + margins, rect.Y + margins, rect.Width - margins*2, rect.Height - margins*2);

            CGContext context = UIGraphics.GetCurrentContext();
            context.AddEllipseInRect(drawRect);
            context.AddEllipseInRect(drawRect.Inset(4,4));
            context.SetFillColor(UIColor.Black.CGColor);
            context.SetStrokeColor(UIColor.White.CGColor);
            context.SetLineWidth(0.5f);
            context.ClosePath();
            context.SetShadow(new SizeF(1,2),4);
            context.DrawPath(CGPathDrawingMode.EOFillStroke);
        }
SatBrightIndicatorView