Comment #2 on issue 137 by allain.lalonde: Calling toImage() on a composite  
node often returns an empty image.

Failing test is:
public void testToImageUsesFullBoundsWhenConvertingImage() throws  
IOException {
         node.setBounds(0, 0, 50, 50);
         PNode child1 = new PNode();
         child1.setBounds(0, 0, 100, 50);

         PNode child2 = new PNode();
         child2.setBounds(0, 0, 50, 100);

         BufferedImage image = (BufferedImage) node.toImage();
         assertEquals(100, image.getWidth());
         assertEquals(100, image.getHeight());
         assertEquals(Color.RED.getRGB(), image.getRGB(99, 1));
         assertEquals(Color.BLUE.getRGB(), image.getRGB(1, 99));

You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

Piccolo2D Developers Group:

Reply via email to