import static org.junit.Assert.assertTrue;\r
import static org.junit.Assert.fail;\r
\r
-import java.awt.Color;\r
+import java.awt.*;\r
+import java.awt.image.BufferedImage;\r
import java.io.IOException;\r
import java.util.List;\r
\r
+import org.apache.poi.sl.draw.DrawFactory;\r
import org.apache.poi.sl.draw.geom.TestPresetGeometries;\r
import org.apache.poi.sl.usermodel.Placeholder;\r
+import org.apache.poi.sl.usermodel.Slide;\r
import org.apache.poi.sl.usermodel.StrokeStyle.LineCap;\r
import org.apache.poi.sl.usermodel.StrokeStyle.LineDash;\r
import org.apache.poi.util.Units;\r
\r
ppt.close();\r
}\r
+\r
+ @SuppressWarnings("Duplicates")\r
+ @Test\r
+ public void testArrayStoreException() throws IOException {\r
+ XMLSlideShow ppt = XSLFTestDataSamples.openSampleDocument("aascu.org_workarea_downloadasset.aspx_id=5864.pptx");\r
+ Dimension pgsize = ppt.getPageSize();\r
+\r
+ for (Slide<?,?> s : ppt.getSlides()) {\r
+ //System.out.println("Slide: " + s);\r
+\r
+ BufferedImage img = new BufferedImage(pgsize.width, pgsize.height, BufferedImage.TYPE_INT_ARGB);\r
+ Graphics2D graphics = img.createGraphics();\r
+ DrawFactory.getInstance(graphics).fixFonts(graphics);\r
+\r
+ // default rendering options\r
+ graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r
+ graphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\r
+ graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);\r
+ graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);\r
+\r
+ // draw stuff\r
+ s.draw(graphics);\r
+\r
+ graphics.dispose();\r
+ img.flush();\r
+ }\r
+ ppt.close();\r
+ }\r
}
\ No newline at end of file