本文整理汇总了C#中Ellipse.OnDraw方法的典型用法代码示例。如果您正苦于以下问题:C# Ellipse.OnDraw方法的具体用法?C# Ellipse.OnDraw怎么用?C# Ellipse.OnDraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ellipse
的用法示例。
在下文中一共展示了Ellipse.OnDraw方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderingWithEntityHandlersInAnyOrder
public void RenderingWithEntityHandlersInAnyOrder()
{
var ellipse1 = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Blue) { RenderLayer = 0 };
ellipse1.Add(new OutlineColor(Color.Red));
ellipse1.OnDraw<DrawPolygon2D>();
ellipse1.OnDraw<DrawPolygon2DOutlines>();
var ellipse2 = new Ellipse(Vector2D.Half, 0.1f, 0.2f, Color.Green) { RenderLayer = 1 };
ellipse2.Add(new OutlineColor(Color.Red));
ellipse2.OnDraw<DrawPolygon2DOutlines>();
ellipse2.OnDraw<DrawPolygon2D>();
}
示例2: RenderingHiddenEllipseDoesNotThrowException
public void RenderingHiddenEllipseDoesNotThrowException()
{
var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Red);
ellipse.Add(new OutlineColor(Color.Yellow));
ellipse.OnDraw<DrawPolygon2DOutlines>();
Assert.DoesNotThrow(() => AdvanceTimeAndUpdateEntities());
}
示例3: RenderingPolygonWithNoPointsDoesNotError
public void RenderingPolygonWithNoPointsDoesNotError()
{
var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Blue);
var points = ellipse.Get<List<Vector2D>>();
points.Clear();
ellipse.Remove<Ellipse.UpdatePointsIfRadiusChanges>();
ellipse.Add(new OutlineColor(Color.Red));
ellipse.OnDraw<DrawPolygon2DOutlines>();
}
示例4: RenderRedOutlinedEllipse
public void RenderRedOutlinedEllipse()
{
var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Red);
ellipse.Add(new OutlineColor(Color.Yellow));
ellipse.OnDraw<DrawPolygon2DOutlines>();
}