I’m using the Line class to draw on a canvas in WPF and even though I set StrokeThickness = 1, the line shows up 2 pixels wide – it’s almost as if the minimum thickness is two. How do I draw a line that is truly 1 pixel thick?
Line myLine = new Line();
myLine.Stroke = System.Windows.Media.Brushes.Black;
myLine.X1 = 100;
myLine.X2 = 140; // 150 too far
myLine.Y1 = 200;
myLine.Y2 = 200;
myLine.StrokeThickness = 1;
graphSurface.Children.Add(myLine);
Two things: