private static void RenderDepressedCircularButton(this Graphics Graphics, Rectangle ClientRectangle, Color BackGroundColor, Single Depth = 1) { using (var pen = new Pen(BackGroundColor, Depth)) using (var brush = new System.Drawing.Drawing2D.LinearGradientBrush(ClientRectangle, BackGroundColor.MakeShaded(50), BackGroundColor.MakeHilighted(10), LinearGradientMode.ForwardDiagonal)) { Graphics.FillEllipse(brush, ClientRectangle); var originalSmoothingMode = Graphics.SmoothingMode; try { Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; Graphics.DrawEllipse(pen, ClientRectangle); } finally { Graphics.SmoothingMode = originalSmoothingMode; } } Graphics.RenderCircle(ClientRectangle, BackGroundColor.MakeShaded(15), Depth); }
public static void RenderDepressedDisk(this Graphics Graphics, Rectangle ClientRectangle, Color BackGroundColor, Single Depth = 1) { using (var darkPen = new Pen(BackGroundColor.MakeShaded(50), Depth)) using (var lightPen = new Pen(BackGroundColor.MakeHilighted(50), Depth)) { Graphics.DrawArc(lightPen, ClientRectangle, -45, 180); Graphics.DrawArc(darkPen, ClientRectangle, 135, 180); } }
public static void RenderRaisedDisk(this Graphics Graphics, Rectangle ClientRectangle, Color BackGroundColor, Single Depth = 1) { using (var darkPen = new Pen(BackGroundColor.MakeShaded(50), Depth)) using (var lightPen = new Pen(BackGroundColor.MakeHilighted(50), Depth)) { Graphics.DrawArc(darkPen, ClientRectangle, -45, 180); Graphics.DrawArc(lightPen, ClientRectangle, 135, 180); } }
public static Rectangle RenderNonFocusedRadialBezel(this Graphics Graphics, Rectangle ClientRectangle, Color BackGroundColor) { using (var pen = new Pen(BackGroundColor.MakeShaded(40), 1)) { pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid; pen.DashCap = System.Drawing.Drawing2D.DashCap.Round; Graphics.DrawEllipse(pen, ClientRectangle); var reducedRectangle = new Rectangle(ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width, ClientRectangle.Height); reducedRectangle.Inflate(-1, -1); return(reducedRectangle); } }
public static Rectangle RenderNonFocusedRadialBezel(this Graphics Graphics, Rectangle ClientRectangle, Color BackGroundColor) { using (var pen = new Pen(BackGroundColor.MakeShaded(40), 1)) { pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid; pen.DashCap = System.Drawing.Drawing2D.DashCap.Round; Graphics.DrawEllipse(pen, ClientRectangle); var reducedRectangle = new Rectangle(ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width, ClientRectangle.Height); reducedRectangle.Inflate(-1, -1); return reducedRectangle; } }
public static void RenderRaisedCircularButton(this Graphics Graphics, Rectangle ClientRectangle, Color BackGroundColor, Single Depth = 1) { using (var pen = new Pen(BackGroundColor, Depth)) using (var brush = new System.Drawing.Drawing2D.LinearGradientBrush(ClientRectangle, BackGroundColor.MakeHilighted(10), BackGroundColor.MakeShaded(50), LinearGradientMode.ForwardDiagonal)) { Graphics.FillEllipse(brush, ClientRectangle); var originalSmoothingMode = Graphics.SmoothingMode; try { Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; Graphics.DrawEllipse(pen, ClientRectangle); } finally { Graphics.SmoothingMode = originalSmoothingMode; } } Graphics.RenderCircle(ClientRectangle, BackGroundColor.MakeShaded(7), Depth); }