You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by sujikin <su...@gmail.com> on 2009/03/25 11:15:47 UTC

Rotating text through 90 degree in HSLF

Hi,

I am trying to rotate text through 90 degrees in HSLF by the following code

                                      SlideShow slideShow = new SlideShow();
			Slide slide = slideShow.createSlide();
			ShapeGroup group = new ShapeGroup();
			Rectangle bounds = new java.awt.Rectangle(200, 100, 350, 300);
			group.setAnchor(bounds);
			slide.addShape(group);
			PPGraphics2D graphics = new PPGraphics2D(group);	        
			AffineTransform af1 = graphics.getTransform(); //save initial
			//drawing
			float xp = (float) (100f);
			float yp = (float) (50f);
			AffineTransform af2 = AffineTransform.getRotateInstance
			(Math.toRadians(90), xp, yp);
			graphics.setTransform(af2);
			graphics.drawString("Number of Online Users", xp, yp);
			graphics.setTransform(af1); //back to "normal" drawing		                         
slideShow.write(out);
But it is not working.

Can somebody advice how to make it work?

sujikin
-- 
View this message in context: http://www.nabble.com/Rotating-text-through-90-degree-in-HSLF-tp22698638p22698638.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org