Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2498 | - | 1 | |
2 | using System; |
||
3 | namespace GMap.NET.Internals |
||
4 | { |
||
5 | /// <summary> |
||
6 | /// struct for drawing tile |
||
7 | /// </summary> |
||
8 | internal struct DrawTile : IEquatable<DrawTile>, IComparable<DrawTile> |
||
9 | { |
||
10 | public GPoint PosXY; |
||
11 | public GPoint PosPixel; |
||
12 | public double DistanceSqr; |
||
13 | |||
14 | public override string ToString() |
||
15 | { |
||
16 | return PosXY + ", px: " + PosPixel; |
||
17 | } |
||
18 | |||
19 | #region IEquatable<DrawTile> Members |
||
20 | |||
21 | public bool Equals(DrawTile other) |
||
22 | { |
||
23 | return (PosXY == other.PosXY); |
||
24 | } |
||
25 | |||
26 | #endregion |
||
27 | |||
28 | #region IComparable<DrawTile> Members |
||
29 | |||
30 | public int CompareTo(DrawTile other) |
||
31 | { |
||
32 | return other.DistanceSqr.CompareTo(DistanceSqr); |
||
33 | } |
||
34 | |||
35 | #endregion |
||
36 | } |
||
37 | } |