Hi, there
I am drawing a rectangle into a PdfGraphics2D. The graphic context is
rotated and the rectangle width is set with a stroke. The stronger the
rotation, the narrower is the width of the frame. When rotation is at 90
degrees, the frame has a width of 1. At 30 or 150 degrees, the frame width
is approx 75% of what is should be. It looks as if the stroke has only one
dimension and is not being rotated correctly. Any ideas?
This is the code, quite basic:
public void paintComponent( Graphics g)
{
Rectangle r = new Rectangle (100, 100, 200, 200);
AffineTransform fSaveAT = ((Graphics2D) g).getTransform();
Point ceterPoint = Point (r.x + (r.width >> 1), r.y + (r.height >> 1));
((Graphics2D) g).rotate (1.0, (double) ceterPoint.x, (double)
ceterPoint.y);
((Graphics2D) g).setStroke (new BasicStroke (new Integer
(32).floatValue()));
g.setColor (Color.balck);
frameRect.grow (-16, -16);
g.drawRect (r.x, r.y, r.width, r.height);
((Graphics2D) g).setTransform (fSaveAT);
}
Thanks
-yishai
-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions