Microscopic Traffic Simulator

- Main Page
- Packages
- Classes
- Files

- File List

BezierCurveGeometryCreator.cs
Go to the documentation of this file.
1 using System.Collections.Generic;
2 using System.Windows;
3 using System.Windows.Media;
4
5 namespace Microscopic_Traffic_Simulator.Renderers
6 {
10 class BezierCurveGeometryCreator
11 {
20 internal PathGeometry GetBezierCurveGeometry(Point p1, Point p2, Point c1, Point c2)
21 {
22 BezierSegment bezierSegment = new BezierSegment(c1, c2, p2, true);
23 PathFigure pathFigure = new PathFigure(p1, new List<PathSegment>() { bezierSegment }, false);
24 pathFigure.Freeze();
25 PathGeometry geometry = new PathGeometry(new List<PathFigure>() { pathFigure });
26 geometry.Freeze();
27 return geometry;
28 }
29 }
30 }
System
Microscopic_Traffic_Simulator
Definition: App.xaml.cs:12
Microscopic_Traffic_Simulator.Renderers.BezierCurveGeometryCreator
Class for creating geometry with bezier curve from canvas-coordinated points.
Definition: BezierCurveGeometryCreator.cs:10