use of org.apache.poi.xslf.usermodel.XSLFAutoShape in project poi by apache.
the class TestXSLFSlideShow method testMasterBackground.
@Test
public void testMasterBackground() throws IOException {
XMLSlideShow ppt = new XMLSlideShow();
XSLFBackground b = ppt.getSlideMasters().get(0).getBackground();
b.setFillColor(Color.RED);
XSLFSlide sl = ppt.createSlide();
XSLFAutoShape as = sl.createAutoShape();
as.setAnchor(new Rectangle2D.Double(100, 100, 100, 100));
as.setShapeType(ShapeType.CLOUD);
XMLSlideShow ppt2 = XSLFTestDataSamples.writeOutAndReadBack(ppt);
ppt.close();
XSLFBackground b2 = ppt2.getSlideMasters().get(0).getBackground();
assertEquals(Color.RED, b2.getFillColor());
ppt2.close();
}
Aggregations