Closed GoogleCodeExporter closed 9 years ago
Thank you for reporting this. I will resolve it shortly. (After putting in a
unit
test to test it.)
Original comment by allain.lalonde
on 14 Oct 2009 at 8:10
Failing test is:
public void testToImageUsesFullBoundsWhenConvertingImage() throws IOException {
node.setBounds(0, 0, 50, 50);
PNode child1 = new PNode();
child1.setBounds(0, 0, 100, 50);
child1.setPaint(Color.RED);
node.addChild(child1);
PNode child2 = new PNode();
child2.setBounds(0, 0, 50, 100);
child2.setPaint(Color.BLUE);
node.addChild(child2);
BufferedImage image = (BufferedImage) node.toImage();
assertNotNull(image);
assertEquals(100, image.getWidth());
assertEquals(100, image.getHeight());
assertEquals(Color.RED.getRGB(), image.getRGB(99, 1));
assertEquals(Color.BLUE.getRGB(), image.getRGB(1, 99));
}
Original comment by allain.lalonde
on 14 Oct 2009 at 8:36
Fixed in r709
Original comment by allain.lalonde
on 14 Oct 2009 at 8:41
Original comment by heue...@gmail.com
on 30 Oct 2009 at 2:58
Original issue reported on code.google.com by
reids%co...@gtempaccount.com
on 14 Oct 2009 at 7:46