Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cvMap.Children.Clear();
- foreach (Teilstrecke teilstrecke in teilstrecken)
- {
- Line line = new Line();
- if (teilstrecke.vonOrt.StartsWith("A"))
- line.Stroke = Brushes.Red;
- else if (teilstrecke.vonOrt.StartsWith("B"))
- line.Stroke = Brushes.Blue;
- else
- line.Stroke = Brushes.Green;
- sizeFactorX = cvMap.ActualWidth / 60000.0;
- sizeFactorY = cvMap.ActualHeight / 30000.0;
- line.X1 = teilstrecke.vonPoint.X * sizeFactorX;
- line.X2 = teilstrecke.bisPoint.X * sizeFactorX;
- line.Y1 = teilstrecke.vonPoint.Y * sizeFactorY;
- line.Y2 = teilstrecke.bisPoint.Y * sizeFactorY;
- line.StrokeThickness = 2;
- cvMap.Children.Add(line);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement