문제

How is it possible, that 2 ellipses with the same Radius where not (visually) with the same Radius?

in the image bellow, Black and Red ellipses has the same RadiusX... but look on the picture!
alt text

<GeometryDrawing Brush="Red">
    <GeometryDrawing.Pen>
        <Pen Brush="Yellow" Thickness="1"/>
    </GeometryDrawing.Pen>
    <GeometryDrawing.Geometry>
        <GeometryGroup>
            <EllipseGeometry x:Name="MediumCircle" 
                             Center="0,0" RadiusX="4" RadiusY="4" />
        </GeometryGroup>
    </GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="Black">
    <GeometryDrawing.Geometry>
        <GeometryGroup>
            <EllipseGeometry x:Name="SmallCircle" 
                             Center="0,0" RadiusX="4" RadiusY="2"/>
        </GeometryGroup>
    </GeometryDrawing.Geometry>
</GeometryDrawing>
도움이 되었습니까?

해결책 3

I think I found the reply, but not sure... The Thickness of the ellipse goes not totally around the ellipse. If we Set the Thickness to 4 we will see only 2 pixels of ellipse, if we set at 8, we will not see the red circle anymore...

다른 팁

One has a stroked border and the other doesn't. You'll notice the radius lines up with the center of the stroked border.

Looks like the thickness is to blame. Make them the same for both.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top