Skip to content

Instantly share code, notes, and snippets.

@hiroshi
Created December 11, 2011 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiroshi/1460594 to your computer and use it in GitHub Desktop.
Save hiroshi/1460594 to your computer and use it in GitHub Desktop.
iOSMoviePlayButton.pjs
/* @pjs transparent=true; */
void setup() {
//int m = 5.2; // mergin
int s = 100; // size
size(s, s);
background(0, 0, 0, 0);
// background transparent circle
noStroke();
fill(0, 0, 0, 100);
ellipse(s/2, s/2, s, s);
// outer line circle
noFill();
stroke(255);
strokeWeight(5);
ellipse(s/2, s/2, s * 0.9, s * 0.9)
// play triangle
noStroke();
fill(255);
beginShape();
int x = s;
int y = s/2;
for (int i = 0; i< 4; i++) {
vertex(s/2 + s * 0.3 * cos(i * TWO_PI / 3), s/2 + s * 0.3 * sin(i * TWO_PI / 3));
}
endShape();
}
/* @pjs transparent=true; */
void setup() {
//int m = 5.2; // mergin
//int s = 80; // size
float s = 1; // 1 for retina
int w = 28 * s;
int h = 16 * s;
size(w, h);
background(0, 0, 0, 0);
// box
int color = 255;
noStroke();
fill(color);
rect(0, 0, w * 0.65, h);
// triangle
triangle(w - h/2, h/2, w, 0, w, h);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment