M
M
Mikhail2017-11-22 18:38:24
Canvas
Mikhail, 2017-11-22 18:38:24

Why are lines distorted when drawing in WPF?

Hello. Drawing animation on canvas using C#. She looks like this .
At the bottom right, a line comes out of the circle. I tried to remove a few lines from the animations and noticed that then everything is already drawn normally:
Example 1
Example 2
That is, this bug appears due to the "overlapping" of several lines on top of each other. The question is how to fix it? I draw lines like this:

Polyline lineDAB = new Polyline{ Stroke = Brushes.Black, StrokeThickness = 2 };
lineDAB.Points.Add(new Point(...));

PS When the StrokeThickness of the lines is reduced, the bug disappears

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lam0x86, 2017-11-22
@mak_ufo

You need to set the property StrokeLineJointo Bevel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question