-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathControlPoint.cs
More file actions
68 lines (56 loc) · 1.75 KB
/
ControlPoint.cs
File metadata and controls
68 lines (56 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#region Header
//
// Project: WriteableBitmapEx - Silverlight WriteableBitmap extensions
// Description: A control point for a spline curve.
//
// Changed by: $Author: unknown $
// Changed on: $Date: 2015-02-24 20:36:41 +0100 (Di, 24 Feb 2015) $
// Changed in: $Revision: 112951 $
// Project: $URL: https://writeablebitmapex.svn.codeplex.com/svn/trunk/Source/WriteableBitmapExCurveSample/ControlPoint.cs $
// Id: $Id: ControlPoint.cs 112951 2015-02-24 19:36:41Z unknown $
//
//
// Copyright © 2009-2015 Rene Schulte and WriteableBitmapEx Contributors
//
// This code is open source. Please read the License.txt for details. No worries, we won't sue you! ;)
//
#endregion
using System.Windows;
using System;
using Schulte.Silverlight;
#if NETFX_CORE
using Windows.Foundation;
#endif
using Vector = Schulte.Silverlight.Vector;
namespace WriteableBitmapExCurveSample
{
/// <summary>
/// A control point for a spline curve.
/// </summary>
public class ControlPoint
{
private Vector point;
public int X { get { return point.X; } set { point.X = value; } }
public int Y { get { return point.Y; } set { point.Y = value; } }
public ControlPoint(Vector point)
{
this.point = point;
}
public ControlPoint()
: this(Vector.Zero)
{
}
public ControlPoint(int x, int y)
: this(new Vector(x, y))
{
}
public ControlPoint(Point point)
: this((int)point.X, (int) point.Y)
{
}
public override string ToString()
{
return String.Format("({0}, {1})", X, Y);;
}
}
}