简体   繁体   English

没有指定填充的C#DrawElipse方法

[英]C# DrawElipse Method without specifying a fill

Simple Question - How do I use drawing context to make an Ellipse but not fill it with colour? 一个简单的问题-如何使用绘图上下文创建一个椭圆但不填充颜色?

At the moment I have: 目前,我有:

 drawingContext.DrawEllipse(drawBrush, null, jointPoints[jointType],   JointThickness, JointThickness);

This gives me an Ellipse that is filled with colour at every joint position tracked with the Kinect. 这使我得到一个椭圆形,在用Kinect跟踪的每个关节位置上都充满了颜色。

I want to display an outter circle without a fill, how can I do this? 我想显示一个没有填充的外圈,我该怎么做? 在此处输入图片说明

For Example like the image above, how would I make the outter circle? 例如上图所示的示例,我如何制作外圆?

Simply pass null for the brush and pass in a Pen of the desired color instead. 只需为画笔传递null ,然后传递所需颜色的Pen

From MSDN : MSDN

The brush with which to fill the ellipse. 用来填充椭圆的画笔。 This is optional, and can be null. 这是可选的,可以为null。 If the brush is null, no fill is drawn. 如果笔刷为空,则不会绘制填充。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM