• Post Reply Bookmark Topic Watch Topic
  • New Topic

Transforms on a grahics object  RSS feed

 
Stewart Griffin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever i apply an affine transformation to
some text, the next piece of text i attempt to
paint to the screen is warped and out of place.
Anyone have a clue how to fix this??
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you provide some of your code to reproduce the problem, please?
 
Stewart Griffin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AffineTransform affine = new AffineTransform();
affine.translate(x[i][4]+10, y[i][4]+pos);
affine.rotate(-writingAngle);
affine.scale(faceScaleX, faceScaleY);
affine.translate(-(x[i][4]+10), -(y[i][4]+pos));
g.transform(affine);

Anytime i try to paint to the screen after this, the image is warped and out of place. Its never where its supposed to be.
Any ideas??
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!