-
Notifications
You must be signed in to change notification settings - Fork 976
Expand file tree
/
Copy pathHitTestResult.cs
More file actions
59 lines (54 loc) · 2.06 KB
/
Copy pathHitTestResult.cs
File metadata and controls
59 lines (54 loc) · 2.06 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
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="HitTestResult.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// <summary>
// Represents a hit test result.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace OxyPlot
{
/// <summary>
/// Represents a hit test result.
/// </summary>
public class HitTestResult
{
/// <summary>
/// Initializes a new instance of the <see cref="HitTestResult" /> class.
/// </summary>
/// <param name="element">The element that was hit.</param>
/// <param name="nearestHitPoint">The nearest hit point.</param>
/// <param name="item">The item.</param>
/// <param name="index">The index.</param>
public HitTestResult(Element element, ScreenPoint nearestHitPoint, object item = null, double index = 0)
{
this.Element = element;
this.NearestHitPoint = nearestHitPoint;
this.Item = item;
this.Index = index;
}
/// <summary>
/// Gets the index of the hit (if available).
/// </summary>
/// <value>The index.</value>
/// <remarks>If the hit was in the middle between point 1 and 2, index = 1.5.</remarks>
public double Index { get; private set; }
/// <summary>
/// Gets the item of the hit (if available).
/// </summary>
/// <value>The item.</value>
public object Item { get; private set; }
/// <summary>
/// Gets the element that was hit.
/// </summary>
/// <value>
/// The element.
/// </value>
public Element Element { get; private set; }
/// <summary>
/// Gets the position of the nearest hit point.
/// </summary>
/// <value>The nearest hit point.</value>
public ScreenPoint NearestHitPoint { get; private set; }
}
}