Package edu.umd.cs.piccolo

Examples of edu.umd.cs.piccolo.PNode.addChild()


    p.setPaint(null);   
    p.setStroke(new BasicStroke(element.lineWidth));


    PNode foregroundNode = new PNode();
    foregroundNode.addChild(p);
    foregroundNode.setHeight(p.getHeight()+4);
    foregroundNode.setWidth(p.getWidth()+4);
    p.setOffset(2,2);

    foregroundNode.setOffset(element.x, element.y);
View Full Code Here


 
  static public PNode createFrom(ImageElement element){
    PImage p = new PImage(element.image);

    PNode foregroundNode = new PNode();
    foregroundNode.addChild(p);
    foregroundNode.setHeight(p.getHeight()+4);
    foregroundNode.setWidth(p.getWidth()+4);
    p.setOffset(2,2);

    foregroundNode.setOffset(element.x, element.y);
View Full Code Here

    int ty = 5;

    PShadow shadowNode = new PShadow(contentNode.toImage(), SHADOW_PAINT, blurRadius );   
    contentNode.setOffset(tx, ty);
    shadowNode.setOffset(tx - (2 * blurRadius) + 1.0d, ty - (2 * blurRadius) + 1.0d)
    contentNodeWithShadow.addChild(shadowNode);
    contentNodeWithShadow.addChild(contentNode);         
    contentNodeWithShadow.removeChild(shadowNode);
    contentNodeWithShadow.setOffset(xoffset - tx  - blurRadius, yoffset - ty - blurRadius);
    contentNodeWithShadow.setBounds(0,0, contentNode.getWidth() + 2*blurRadius + tx, contentNode.getHeight() + 2*blurRadius + ty);
    return contentNodeWithShadow;
View Full Code Here

    PShadow shadowNode = new PShadow(contentNode.toImage(), SHADOW_PAINT, blurRadius );   
    contentNode.setOffset(tx, ty);
    shadowNode.setOffset(tx - (2 * blurRadius) + 1.0d, ty - (2 * blurRadius) + 1.0d)
    contentNodeWithShadow.addChild(shadowNode);
    contentNodeWithShadow.addChild(contentNode);         
    contentNodeWithShadow.removeChild(shadowNode);
    contentNodeWithShadow.setOffset(xoffset - tx  - blurRadius, yoffset - ty - blurRadius);
    contentNodeWithShadow.setBounds(0,0, contentNode.getWidth() + 2*blurRadius + tx, contentNode.getHeight() + 2*blurRadius + ty);
    return contentNodeWithShadow;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.