/sigmah/src/test/java/org/sigmah/server/report/renderer/ppt/PptAlphaCheck.java
http://sigma-h.googlecode.com/ · Java · 42 lines · 22 code · 13 blank · 7 comment · 1 complexity · b50cd5d333ad06f0d4045ee1d1f67cf3 MD5 · raw file
- /*
- * All Sigmah code is released under the GNU General Public License v3
- * See COPYRIGHT.txt and LICENSE.txt.
- */
-
- package org.sigmah.server.report.renderer.ppt;
-
- import org.apache.poi.ddf.EscherProperties;
- import org.apache.poi.hslf.HSLFSlideShow;
- import org.apache.poi.hslf.model.Shape;
- import org.apache.poi.hslf.model.Slide;
- import org.apache.poi.hslf.usermodel.SlideShow;
- import org.junit.Test;
-
- import java.io.IOException;
- import java.io.InputStream;
- /*
- * @author Alex Bertram
- */
-
- public class PptAlphaCheck {
-
-
- @Test
- public void testAlphaValues() throws IOException {
-
-
- InputStream in = PptAlphaCheck.class.getResourceAsStream("/alpha.ppt");
- SlideShow ppt = new SlideShow( new HSLFSlideShow(in) );
-
- Slide[] slides = ppt.getSlides();
- Shape[] shapes = slides[0].getShapes();
-
- for(int i=0; i!=shapes.length; ++i) {
- System.out.println(String.format("slide %d, opacity = %d", i,
- shapes[i].getEscherProperty(EscherProperties.FILL__FILLOPACITY)));
-
-
- }
-
- }
- }