Hi all,
I am a new person in use of POI. I'm trying to draw some shapes on a slide. 
When I drawn line or rectangle with specified color, the color did not work. 
But the method Graphics2D.fillRect() worked well.
The below is my code:
                Slide s2 = ppt.createSlide();
                ShapeGroup group = new ShapeGroup();
                group.setAnchor(new Rectangle(100, 100, 300, 300));
                s2.addShape(group);
                
                Graphics2D g = new PPGraphics2D(group);
                g.setColor(Color.red);
                g.drawString("Color not work from shape", 100, 100);
                g.setColor(Color.blue);
                g.drawLine(100, 100, 200, 200);
                g.setColor(Color.green);
                g.drawRect(100, 220, 100, 100);
                g.fillRect(220, 220, 100, 100);

Is there any problem with my code? or the API cannot support this.
Any answer will be appreciated. 
Thanks

 

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Using-Graphics2D-to-draw-line-on-a-Slide-the-color-setting-is-not-work-tp5709997.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to