Menu

#43 Saving SwtChart as an Image file Problem

Next Release
closed-duplicate
nobody
None
5
2013-12-13
2012-07-20
No

Hello Guys,

private void createImageFile(Composite composite){
Image image = new Image(Display.getDefault(), composite.getBounds().width, composite.getBounds().height);
ImageLoader loader = new ImageLoader();
GC gc = new GC(image);
gc.setTransform(tr);

sc.print(gc);

tr.dispose();
gc.dispose();

loader.data = new ImageData[]{image.getImageData()};
loader.save("C:\\Users\\na35732\\Desktop\\out.png", SWT.IMAGE_PNG);
System.out.println("Image is generated");
}

The above Function is able to generate the image file, But in the image the legends are missing.
Can you please Help me to solve this probelm?

Thanks,
Praveen.

Discussion

  • Praveen Dande

    Praveen Dande - 2012-07-20

    You can see the missing legends in the attached image

     
  • yoshitaka

    yoshitaka - 2013-12-13

    seems to be the same root cause as bug #26

     
  • yoshitaka

    yoshitaka - 2013-12-13
    • status: open --> closed-duplicate
    • Group: --> Next Release