summaryrefslogtreecommitdiff
path: root/tomorrowthegroundGUI/tomorrowthegroundGUI.pde
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-05-05 12:06:55 +0100
committerTim Redfern <tim@eclectronics.org>2012-05-05 12:06:55 +0100
commit421cdd72c6395719b56191c187d9f2ba31664670 (patch)
treeab216b9573196f898b8c0e0770a46015deeec03e /tomorrowthegroundGUI/tomorrowthegroundGUI.pde
parentb5914dd492fa4716737bbe43f4abcad5258b6396 (diff)
scale layers test
Diffstat (limited to 'tomorrowthegroundGUI/tomorrowthegroundGUI.pde')
-rw-r--r--tomorrowthegroundGUI/tomorrowthegroundGUI.pde28
1 files changed, 21 insertions, 7 deletions
diff --git a/tomorrowthegroundGUI/tomorrowthegroundGUI.pde b/tomorrowthegroundGUI/tomorrowthegroundGUI.pde
index b359409..ae035b1 100644
--- a/tomorrowthegroundGUI/tomorrowthegroundGUI.pde
+++ b/tomorrowthegroundGUI/tomorrowthegroundGUI.pde
@@ -9,18 +9,32 @@ float lat1,lng1,lat2,lng2,fw,fh;
void setup()
{
bgmaps=new PImage[2];
- bgmaps[0] = loadImage("gentmap.png");
- bgmaps[1] = loadImage("indexmapV1.gif");
+ int map=2;
+ switch (map) {
+ case 1:
+ bgmaps[0] = loadImage("gentmap.png");
+ bgmaps[1] = loadImage("indexmapV1.gif");
+ lat1=51.050608;
+ lng1=3.724698;
+ lat2=51.046878;
+ lng2=3.732852;
+ break;
+ case 2:
+ bgmaps[0] = loadImage("TimelabTestAreaGUI.jpg");
+ bgmaps[1] = loadImage("TimelabTestAreaGRADIENT.png");
+ lat1=51.043293;
+ lng1=3.737025;
+ lat2=51.042154;
+ lng2=3.739584;
+ break;
+ }
usemap=0;
- size(bgmap.width,bgmap.height);
+ size(bgmaps[0].width,bgmaps[0].height);
frameRate(15);
udp = new UDP(this);
x=width/2;
y=height/2;
- lat1=51.050608;
- lng1=3.724698;
- lat2=51.046878;
- lng2=3.732852;
+
fw=lng2-lng1;
fh=lat1-lat2;
}