Hi, I am trying to create a circular text. I managed to do this somehow by looping each rotated character. But I still do not understand. I do not understand the corners. Can someone please give me a good explanation? As in the following code, why is it not exactly 90 degrees? But somewhere between 100 and 120?Graphics2D g2d = (Graphics2D)g;
AffineTransform xform1, cxform;
xform1 = AffineTransform.getTranslateInstance(200,200);
g2d.setTransform(xform1);
g2d.drawLine(0, -20, 0, 20);
g2d.drawLine(-20, 0, 20, 0);
xform1.rotate(Math.toDegrees(90));
g2d.setTransform(xform1);
g2d.drawString("a", 0, 20);
My first post. I hope I have not made any mistakes. Thanks
source
share