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


C# Color.ToSFMLColor方法代码示例

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


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

示例1: drawHollowPoint

        /// <summary>
        /// Draws a hollow Point to the CurrentRenderTarget
        /// </summary>
        /// <param name="posX"> Pos X of Point </param>
        /// <param name="posY"> Pos Y of Point </param>
        /// <param name="OutlineColor"> Outline Color </param>
        public static void drawHollowPoint(int posX, int posY, SystemColor OutlineColor)
        {
            RectangleShape hollowPoint = new RectangleShape();
            hollowPoint.Position = new Vector2(posX, posY);
            hollowPoint.Size = new Vector2(1, 1);
            hollowPoint.FillColor = SystemColor.Transparent.ToSFMLColor();
            hollowPoint.OutlineThickness = .6f;
            hollowPoint.OutlineColor = OutlineColor.ToSFMLColor();

            CurrentRenderTarget.Draw(hollowPoint);
        }
开发者ID:millpond,项目名称:space-station-14,代码行数:17,代码来源:CluwneLib.cs

示例2: drawLine

        /// <summary>
        /// Draws a Line to the CurrentRenderTarget
        /// </summary>
        /// <param name="posX"> Pos X of Line </param>
        /// <param name="posY"> Pos Y of Line </param>
        /// <param name="rotate"> Line Rotation </param>
        /// <param name="thickness"> Line Thickness </param>
        /// <param name="Color"> Line Color </param>
        public static void drawLine(int posX, int posY, int rotate,float thickness, SystemColor Color)
        {
            RectangleShape line = new RectangleShape();
            line.Position = new Vector2(posX,posY);
            line.Rotation = rotate;
            line.OutlineThickness = thickness;
            line.FillColor = Color.ToSFMLColor();

            CurrentRenderTarget.Draw(line);
        }
开发者ID:millpond,项目名称:space-station-14,代码行数:18,代码来源:CluwneLib.cs

示例3: drawHollowCircle

        /// <summary>
        /// Draws a Hollow Circle to the CurrentRenderTarget
        /// </summary>
        /// <param name="posX"> Pos X of Circle </param>
        /// <param name="posY"> Pos Y of Circle </param>
        /// <param name="radius"> Radius of Circle </param>
        /// <param name="OutlineThickness"> Thickness of Circle Outline </param>
        /// <param name="OutlineColor"> Circle outline Color </param>
        public static void drawHollowCircle(int posX, int posY, int radius,float OutlineThickness ,SystemColor OutlineColor)
        {
            CircleShape Circle = new CircleShape();
            Circle.Position = new Vector2(posX, posY);
            Circle.Radius = radius;
            Circle.FillColor = SystemColor.Transparent.ToSFMLColor();
            Circle.OutlineThickness = OutlineThickness;
            Circle.OutlineColor = OutlineColor.ToSFMLColor();

            CurrentRenderTarget.Draw(Circle);
        }
开发者ID:millpond,项目名称:space-station-14,代码行数:19,代码来源:CluwneLib.cs

示例4: drawPoint

        /// <summary>
        /// Draws a Filled Point to the CurrentRenderTarget
        /// </summary>
        /// <param name="posX"> Pos X of Point </param>
        /// <param name="posY"> Pos Y of Point </param>
        /// <param name="color"> Fill Color </param>
        public static void drawPoint(int posX, int posY, SystemColor color)
        {
            RectangleShape Point = new RectangleShape();
            Point.Position = new Vector2(posX, posY);
            Point.Size = new Vector2(1, 1);
            Point.FillColor = color.ToSFMLColor();

            CurrentRenderTarget.Draw(Point);
        }
开发者ID:millpond,项目名称:space-station-14,代码行数:15,代码来源:CluwneLib.cs

示例5: drawCircle

        /// <summary>
        /// Draws a Filled Circle to the CurrentRenderTarget
        /// </summary>
        /// <param name="posX"> Pos X of Circle</param>
        /// <param name="posY"> Pos Y of Circle </param>
        /// <param name="radius"> Radius of Circle </param>
        /// <param name="color"> Fill Color </param>
        public static void drawCircle(int posX, int posY, int radius, SystemColor color)
        {
            CircleShape Circle = new CircleShape();
            Circle.Position = new Vector2(posX, posY);
            Circle.Radius = radius;
            Circle.FillColor = color.ToSFMLColor();

            CurrentRenderTarget.Draw(Circle);


        }
开发者ID:millpond,项目名称:space-station-14,代码行数:18,代码来源:CluwneLib.cs

示例6: drawHollowRectangle

        /// <summary>
        /// Draws a Hollow Rectangle to the Current RenderTarget
        /// </summary>
        /// <param name="posX"> Pos X of rectangle </param>
        /// <param name="posY"> Pos Y of rectangle </param>
        /// <param name="widthX"> Width X of rectangle </param>
        /// <param name="heightY"> Height Y of rectangle </param>
        /// <param name="OutlineThickness"> Outline Thickness of rectangle </param>
        /// <param name="OutlineColor"> Outline Color </param>
        public static void drawHollowRectangle(int posX, int posY, int widthX, int heightY, float OutlineThickness, SystemColor OutlineColor)
        {
            RectangleShape HollowRect = new RectangleShape();
            HollowRect.FillColor = SystemColor.Transparent.ToSFMLColor();
            HollowRect.Position = new Vector2f(posX, posY);
            HollowRect.Size = new Vector2f(widthX, heightY);
            HollowRect.OutlineThickness = OutlineThickness;
            HollowRect.OutlineColor = OutlineColor.ToSFMLColor();

            CurrentRenderTarget.Draw(HollowRect);
            if (CluwneLib.Debug.RenderingDelay > 0)
            {
                CluwneLib.Screen.Display();
                System.Threading.Thread.Sleep(CluwneLib.Debug.RenderingDelay);
            }


        }
开发者ID:millpond,项目名称:space-station-14,代码行数:27,代码来源:CluwneLib.cs

示例7: drawRectangle

        /// <summary>
        /// Draws a Rectangle to the current RenderTarget
        /// </summary>
        /// <param name="posX">Pos X of rectangle </param>
        /// <param name="posY"> Pos Y of rectangle </param>
        /// <param name="WidthX"> Width X of rectangle </param>
        /// <param name="HeightY"> Height Y of rectangle </param>
        /// <param name="Color"> Fill Color </param>
        public static void drawRectangle(int posX, int posY, int WidthX, int HeightY, SystemColor Color)
        {
            RectangleShape rectangle = new RectangleShape();
            rectangle.Position = new SFML.System.Vector2f(posX, posY);
            rectangle.Size = new SFML.System.Vector2f(WidthX, HeightY);
            rectangle.FillColor = Color.ToSFMLColor();

            CurrentRenderTarget.Draw(rectangle);
            if (CluwneLib.Debug.RenderingDelay > 0)
            {
                CluwneLib.Screen.Display();
                System.Threading.Thread.Sleep(CluwneLib.Debug.RenderingDelay);
            }
        }
开发者ID:millpond,项目名称:space-station-14,代码行数:22,代码来源:CluwneLib.cs

示例8: Clear

 public static void Clear(SystemColor color)
 {
     CurrentRenderTarget.Clear(color.ToSFMLColor());
 }
开发者ID:millpond,项目名称:space-station-14,代码行数:4,代码来源:CluwneLib.cs

示例9: InterpolateComponent

 private static byte InterpolateComponent(SColor endPoint1, SColor endPoint2, double lambda, ComponentSelector selector)
 {
     return (byte)(selector(endPoint1.ToSFMLColor()) + (selector(endPoint2.ToSFMLColor()) - selector(endPoint1.ToSFMLColor())) * lambda);
 }
开发者ID:Tri125,项目名称:space-station-14,代码行数:4,代码来源:Utilities.cs


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