Skip to content

Instantly share code, notes, and snippets.

View ghostandthemachine's full-sized avatar

Jon Rose ghostandthemachine

  • Origin Rose
  • Boulder, Colorado
View GitHub Profile
private SGNode createSmiley() {
SGShape circle = new SGShape();
circle.setShape(new Ellipse2D.Float(-20f, -20f, 40f, 40f));
circle.setFillPaint(Color.YELLOW);
circle.setMode(SGShape.Mode.STROKE_FILL);
circle.setDrawStroke(new BasicStroke(0.15f));
circle.setDrawPaint(Color.black);
circle.setAntialiasingHint(RenderingHints.VALUE_ANTIALIAS_ON);
SGShape leftEye = createFill(new Ellipse2D.Float(-8.5f, -11f, 5f, 8f));
SGShape leftDimple = createStroke(createArc(4f, P(-14.6f, 5.7f), P(-10.6f, 2.7f)), 0.5f);
class Toggle extends BaseObject{
Toggle(){
super("",1,1,mouseX,mouseY);
w = 25;
h = 25;
scaleable = false;
}
void display(){
class BaseObject{
int cx;
int cy;
int px;
int py;
int x;
int y;
int xOffset = 0;
int yOffset = 0;
int w;