【发布时间】:2016-04-29 11:39:01
【问题描述】:
我在 c# 代码中使用 Path 绘制了一系列点。我只是在 xaml 中给出一个例子。
所以折线是从 (20,37) 到 (20,36) 并返回到 (20,37)。应该很短吧?但它变成了大约 9dp 长的片段。
如果我只是从 (20,37) 到 (20,36) 绘制,它的行为是正常的。因为这些点是实时绘制的,我无法进行预处理。
为什么会这样以及如何解决?
<Path Stroke="Black" StrokeThickness="2">
<Path.Data>
<PathGeometry>
<PathFigure StartPoint="20,37">
<PathFigure.Segments>
<LineSegment Point="20,36"/>
<LineSegment Point="20,37"/>
</PathFigure.Segments>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
【问题讨论】:
标签: c# wpf path pathgeometry