示例#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!");
    }
示例#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);
     }
 }
示例#3
0
 void AddSelf()
 {
     contained = true;
     AreaDisplay.AddArea(this);
 }