Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2498 | - | 1 | namespace GMap.NET.Internals |
2 | { |
||
3 | using System.IO; |
||
4 | using System; |
||
5 | using System.Collections.Generic; |
||
6 | |||
7 | /// <summary> |
||
8 | /// struct for raw tile |
||
9 | /// </summary> |
||
10 | internal struct RawTile |
||
11 | { |
||
12 | public int Type; |
||
13 | public GPoint Pos; |
||
14 | public int Zoom; |
||
15 | |||
16 | public RawTile(int Type, GPoint Pos, int Zoom) |
||
17 | { |
||
18 | this.Type = Type; |
||
19 | this.Pos = Pos; |
||
20 | this.Zoom = Zoom; |
||
21 | } |
||
22 | |||
23 | public override string ToString() |
||
24 | { |
||
25 | return Type + " at zoom " + Zoom + ", pos: " + Pos; |
||
26 | } |
||
27 | } |
||
28 | |||
29 | internal class RawTileComparer : IEqualityComparer<RawTile> |
||
30 | { |
||
31 | public bool Equals(RawTile x, RawTile y) |
||
32 | { |
||
33 | return x.Type == y.Type && x.Zoom == y.Zoom && x.Pos == y.Pos; |
||
34 | } |
||
35 | |||
36 | public int GetHashCode(RawTile obj) |
||
37 | { |
||
38 | return obj.Type ^ obj.Zoom ^ obj.Pos.GetHashCode(); |
||
39 | } |
||
40 | } |
||
41 | } |
||
42 |