Package edu.umd.cs.piccolo

Examples of edu.umd.cs.piccolo.PLayer


  }

  @Override
  public void setBounds(int x, int y, int w, int h) {

    PLayer layer = getLayer();
    layer.setBounds(layer.getX(), layer.getY(), w, h);
    topWorld.setBounds(topWorld.getX(), topWorld.getY(), w, h);

    super.setBounds(x, y, w, h);
  }
View Full Code Here


    BufferedImage backgroundImage = getScreenRegion().capture();
    final PImage background = new PImage(backgroundImage);
    canvas.getLayer().addChild(background);
    canvas.setBounds(0,0,backgroundImage.getWidth(),backgroundImage.getHeight());

    PLayer layer = canvas.getLayer();
    Rectangle r = getScreenRegion().getBounds();
    PLayer foregroundLayer = new PLayer();   
    layer.addChild(foregroundLayer);   
    foregroundLayer.setGlobalTranslation(new Point(-r.x,-r.y));

    layer.addChild(foregroundLayer);

    for (Element element : getElements()){
      PNode node = PNodeFactory.createFrom(element);
      foregroundLayer.addChild(node);
    }
    return VisionUtils.createComponentImage(canvas);   
  }
View Full Code Here

TOP

Related Classes of edu.umd.cs.piccolo.PLayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.