Advertisement
Guest User

Untitled

a guest
May 21st, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. cvMap.Children.Clear();
  2. foreach (Teilstrecke teilstrecke in teilstrecken)
  3. {
  4. Line line = new Line();
  5. if (teilstrecke.vonOrt.StartsWith("A"))
  6. line.Stroke = Brushes.Red;
  7. else if (teilstrecke.vonOrt.StartsWith("B"))
  8. line.Stroke = Brushes.Blue;
  9. else
  10. line.Stroke = Brushes.Green;
  11. sizeFactorX = cvMap.ActualWidth / 60000.0;
  12. sizeFactorY = cvMap.ActualHeight / 30000.0;
  13. line.X1 = teilstrecke.vonPoint.X * sizeFactorX;
  14. line.X2 = teilstrecke.bisPoint.X * sizeFactorX;
  15. line.Y1 = teilstrecke.vonPoint.Y * sizeFactorY;
  16. line.Y2 = teilstrecke.bisPoint.Y * sizeFactorY;
  17. line.StrokeThickness = 2;
  18. cvMap.Children.Add(line);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement