Created
December 29, 2012 03:46
-
-
Save asaeed/4404471 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.helloandroid; | |
//import android.app.Activity; | |
//import android.os.Bundle; | |
import processing.core.*; | |
/* | |
public class HelloAndroidProcessing extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
} | |
} | |
*/ | |
public class HelloAndroidProcessing extends PApplet { | |
public static void main(String args[]) { | |
PApplet.main(new String[] { “–present”, “something.whatever” }); | |
} | |
//@Override | |
//public String sketchRenderer() { | |
// return P2D; | |
//} | |
PFont f; | |
String message = “this text is spinning”; | |
float theta; | |
@Override | |
public void setup() { | |
size(200,200); | |
f = createFont(“Arial”, 20, true); | |
} | |
@Override | |
public void draw() { | |
background(255); | |
fill(0); | |
textFont(f); | |
translate(width/2,height/2); | |
rotate(theta); | |
textAlign(CENTER) ; | |
text(message,0,0); | |
theta += 0.05; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment