本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例8: Clear
public static void Clear(SystemColor color)
{
CurrentRenderTarget.Clear(color.ToSFMLColor());
}
示例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);
}