API công khai và các thay đổi không tương thích ngược trong Aspose.Slides cho Java 15.9.0

Thay đổi API công khai

Các phương thức renderToGraphics đã được thêm vào com.aspose.slides.ISlide, Slide

Các phương thức sau đã được thêm vào:

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); được thêm vào giao diện com.aspose.slides.ISlide và lớp com.aspose.slides.Slide. Các phương thức này cho phép render một slide vào đối tượng Graphics2D được chỉ định.


 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);