API pubbliche e modifiche incompatibili retroattive in Aspose.Slides per Java 15.9.0

Modifiche all’API pubblica

I metodi renderToGraphics sono stati aggiunti a com.aspose.slides.ISlide, Slide

Sono stati aggiunti i seguenti metodi:

renderToGraphics(boolean withNotes, java.awt.Graphics2D graphics, int width, int height); renderToGraphics(boolean withNotes, java.awt.Graphics2D graphics, float scale); renderToGraphics(boolean withNotes, java.awt.Graphics2D graphics); sono stati aggiunti all’interfaccia com.aspose.slides.ISlide e alla classe com.aspose.slides.Slide. Questi metodi consentono di renderizzare una diapositiva su un oggetto Graphics2D specificato.


 BufferedImage bufferedImage = new BufferedImage(960, 720, BufferedImage.TYPE_INT_ARGB);

Graphics2D g2d = bufferedImage.createGraphics();

Presentation pres = new Presentation("SomePresentation.pptx");

pres.getSlides().get_Item(0).renderToGraphics(false, g2d, bufferedImage.getWidth(), bufferedImage.getHeight());

g2d.dispose();

ImageIO.write(bufferedImage, "png", fileName);