Exemple #1
0
    public void AreaDisplayProvidesCorrectColorForPointIsInsideArea()
    {
        List <DisplayNode> nodeList = new List <DisplayNode> ();

        nodeList.Add(new DisplayNode(0, 0));
        nodeList.Add(new DisplayNode(0, 2));
        nodeList.Add(new DisplayNode(2, 2));
        nodeList.Add(new DisplayNode(2, 0));

        display.AddArea(Color.blue, nodeList);

        Assert.True(display.GetPointColor(1, 1) == Color.blue, "Wrong color found at 1,1!");
    }
Exemple #2
0
 private void GenerateAreas(OSMData osmData)
 {
     foreach (Area a in osmData.areas)
     {
         List <DisplayNode> areaBounds = new List <DisplayNode>();
         for (int i = 0; i < a.nodeList.Count; i++)
         {
             areaBounds.Add(ChangeLatLonToDisplayNode(a.nodeList[i].lon, a.nodeList[i].lat, mapData));
         }
         areaDisplay.AddArea(a.color, areaBounds);
     }
 }
 void AddSelf()
 {
     contained = true;
     AreaDisplay.AddArea(this);
 }