当前位置: 首页>>代码示例>>C#>>正文


C# Color.MakeHilighted方法代码示例

本文整理汇总了C#中Color.MakeHilighted方法的典型用法代码示例。如果您正苦于以下问题:C# Color.MakeHilighted方法的具体用法?C# Color.MakeHilighted怎么用?C# Color.MakeHilighted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Color的用法示例。


在下文中一共展示了Color.MakeHilighted方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RenderRaisedDisk

 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);
     }
 }
开发者ID:StewartScottRogers,项目名称:RealtimeControlsSolution,代码行数:8,代码来源:DiskRenderer.cs

示例2: RenderFocusedRadialBezel

 public static Rectangle RenderFocusedRadialBezel(this Graphics Graphics, Rectangle ClientRectangle, Color BackGroundColor)
 {
     using (var pen = new Pen(BackGroundColor.MakeHilighted(40), 1)) {
         pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
         pen.DashCap = System.Drawing.Drawing2D.DashCap.Flat;
         Graphics.DrawEllipse(pen, ClientRectangle);
         var reducedRectangle = new Rectangle(ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width, ClientRectangle.Height);
         reducedRectangle.Inflate(-1, -1);
         return reducedRectangle;
     }
 }
开发者ID:StewartScottRogers,项目名称:RealtimeControlsSolution,代码行数:11,代码来源:RadialBazelRenderer.cs

示例3: RenderCircularSignal

 public static void RenderCircularSignal(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;
         }
     }
 }
开发者ID:StewartScottRogers,项目名称:RealtimeControlsSolution,代码行数:14,代码来源:CircularSignalRenderer.cs

示例4: RenderDepressedRectangleButton

 private static void RenderDepressedRectangleButton(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.FillRectangle(brush, ClientRectangle);
         var originalSmoothingMode = Graphics.SmoothingMode;
         try {
             Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
             Graphics.DrawRectangle(pen, ClientRectangle);
         } finally {
             Graphics.SmoothingMode = originalSmoothingMode;
         }
     }
     Graphics.RenderRectangle(ClientRectangle, BackGroundColor.MakeShaded(15), Depth);
 }
开发者ID:StewartScottRogers,项目名称:RealtimeControlsSolution,代码行数:15,代码来源:RectangleButtonRenderer.cs


注:本文中的Color.MakeHilighted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。