I'm using the code below to draw LineGeometry
objects. But somehow I'm getting blurry lines. Any idea why this is happening?
public Window1()
{
InitializeComponent();
var x = 0;
var y = 0;
var n = 0;
while (n<1000)
{
x = x + 20;
if (x > 1200)
{
x = 0;
y = y + 20;
}
var l = new LineGeometry
{
StartPoint = new Point(x, y),
EndPoint = new Point(x, y + 15)
};
MyGroup.Children.Add(l);
n++;
}
}
<Canvas x:Name="MyCanvas" Width="1200" Height="700">
<Path x:Name="MyPath" Stroke="Wheat" SnapsToDevicePixels="True">
<Path.Data>
<GeometryGroup x:Name="MyGroup" >
</GeometryGroup>
</Path.Data>
</Path>
</Canvas>
Here is the result I get: