本文整理汇总了C#中DrawingContext.DrawEllipse方法的典型用法代码示例。如果您正苦于以下问题:C# DrawingContext.DrawEllipse方法的具体用法?C# DrawingContext.DrawEllipse怎么用?C# DrawingContext.DrawEllipse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DrawingContext
的用法示例。
在下文中一共展示了DrawingContext.DrawEllipse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawScene
void DrawScene(DrawingContext dc) {
dc.DrawEllipse(new SolidColorBrush(Color.FromArgb(255, 200, 200, 200)), null, new Point(50, 18), 12, 12);
dc.DrawEllipse(new SolidColorBrush(Color.FromArgb(255, 200, 200, 200)), new Pen(new SolidColorBrush(Color.FromArgb(255, 100, 100, 100)), 3), new Point(50, 51), 12, 12);
dc.DrawEllipse(null, new Pen(new SolidColorBrush(Color.FromArgb(255, 100, 100, 100)), 3), new Point(50, 87), 12, 12);
dc.DrawRectangle(new SolidColorBrush(Color.FromArgb(255, 200, 200, 200)), null, new Rect(25, 111, 24, 24));
dc.DrawRectangle(new SolidColorBrush(Color.FromArgb(255, 200, 200, 200)), new Pen(new SolidColorBrush(Color.FromArgb(255, 100, 100, 100)), 3), new Rect(25, 147, 24, 24));
dc.DrawRectangle(null, new Pen(new SolidColorBrush(Color.FromArgb(255, 100, 100, 100)), 3), new Rect(25, 184, 24, 24));
dc.DrawRoundedRectangle(new SolidColorBrush(Color.FromArgb(255, 200, 200, 200)), null, new Rect(25, 237, 24, 24), 5, 5);
dc.DrawRoundedRectangle(new SolidColorBrush(Color.FromArgb(255, 200, 200, 200)), new Pen(new SolidColorBrush(Color.FromArgb(255, 100, 100, 100)), 3), new Rect(25, 270, 24, 24), 5, 5);
dc.DrawRoundedRectangle(null, new Pen(new SolidColorBrush(Color.FromArgb(255, 100, 100, 100)), 3), new Rect(25, 307, 24, 24), 5, 5);
dc.DrawLine(new Pen(new SolidColorBrush(Color.FromArgb(255, 100, 100, 100)), 3), new Point(50, 340), new Point (70, 360));
}