riadvice / AlivePDF

[Official AlivePDF] - AlivePDF is a client side AS3 PDF generation library for Adobe Flash, Flex and AIR
https://riadvice.github.io/AlivePDF/
32 stars 6 forks source link

Text does not rotate about the origin (fixed value instead) #191

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

After several testing, I found out that although setting all margins of a 
pdf object to 0, rotating a textbox does not rotate about the origin (0,0) 
but instead, rotated around another positive fixed value. This does not 
happen with drawRect or drawEllipse. Here is the code to replicate (I used 
this in a class which extends PDF, which is why I can access 
startTransform and stopTransform):

for(var i =0;i<=90;i==10){
  var xPos = 0;   //you can put any value here
  var yPos = 0;   //you can put any value here
  startTransform();
  myPDF.rotate(i, 0, 0);
  myPDF.addText("testing rotation", xPos, yPos);
  stopTransform();
}

I'm using revision # 242, on Windows XP professional. Using Flash CS3 for 
compiling.

Original issue reported on code.google.com by ayman.ab...@gmail.com on 9 Feb 2010 at 9:39