import processing.core.*;
public class ProcessingandroidActivity extends PApplet {
int dir= 100;
int year, month, day, hour, minute, second;
public void setup() {
size(screenWidth,screenHeight);
background(0);
PFont font = createFont("MS Gothic",24,true);
textFont(font);
year = 2012;
month = 1;
day = 1;
hour = 0;
minute = 0;
}
public void draw() {
background(0);
textSize(25);
fill(255,255,0);
textAlign(LEFT);
stroke(255);
line(0,screenHeight-230,screenWidth,screenHeight-230);
text("方角:", 10, screenHeight-200);
text(dir,70, screenHeight-200);
text("度",110,screenHeight-200);
text("年:", 10, screenHeight-150);
text(year, 40, screenHeight-150);
text("月:", 90, screenHeight-150);
text(month, 120, screenHeight-150);
text("日:", 150,screenHeight-150);
text(day, 170,screenHeight-150);
text("時:",200,screenHeight-150);
text(hour, 230, screenHeight-150);
}
static public void main(String args[]) {
PApplet.main(new String[] { "Test" });
}
}