See the code in PdfContentByte.addImage().

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Matt Benson [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2003 20:26
> To:   Paulo Soares; itext-questions
> Subject:      Re: [iText-questions] rotation
> 
> Is there a way to convert a PdfImportedPage to an
> Image so that I can avoid duplication of code and use
> matrix() to do the calculations for arbitrary
> rotations?  Or even if I have to copy code, the array
> returned is
> 
> [AX, AY, BX, BY, CX, CY, DX, DY]
> 
> Do these correspond to a, b, c, and d of THE
> "Transformation Matrix"?  If so, how do I resolve AX &
> AY to a, etc?
> 
> Thanks,
> Matt
> 
> 
> --- Paulo Soares <[EMAIL PROTECTED]> wrote:
> > What you have is a translation and a rotation. The
> > rotation pivot is always
> > the bottom left point of the object. The translation
> > makes the object to
> > still have the bottom left as the reference. An
> > object rotated 90 degrees
> > disappears to the left and must be pulled right by
> > it's height that now, as
> > the object is laying down, counts as the width.
> > For arbitrary angles the calculations are the same
> > but the angle are
> > not -1,0,1. See Image.matrix() for all those
> > calculations.
> > This is all explained in chapter 4.2 of the PDF
> > reference 1.4.
> > 
> > Best Regards,
> > Paulo Soares
> > ----- Original Message -----
> > From: "Matt Benson" <[EMAIL PROTECTED]>
> > To: "itext-questions"
> > <[EMAIL PROTECTED]>
> > Sent: Thursday, March 20, 2003 21:11
> > Subject: [iText-questions] rotation
> > 
> > 
> > > I am using the following values to assist with
> > > (clockwise) rotation:
> > >
> > > 90 degrees: 0, -1, 1, 0, 0, rect.height()
> > > 180 degrees: -1, 0, 0, -1, rect.width(),
> > rect.height()
> > > 270 degrees: 0, 1, -1, 0, rect.width(), 0
> > > 0/360 degrees: 1, 0, 0, 1, 0, 0
> > >
> > > Paulo gave me the values for 90 and 0/360 ages ago
> > and
> > > I played with them until I figured out how to do
> > 180
> > > and 270.  These work, but I am having difficulty
> > > understanding how they fit into the
> > > cosine-sine-negative sine-cosine instructions in
> > the
> > > tutorial and from Adobe.  What is the formula that
> > > fits these data and would allow rotation to
> > arbitrary
> > > angles?
> > >
> > > Thanks,
> > > Matt
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Platinum - Watch CBS' NCAA March Madness,
> > live on your desktop!
> > > http://platinum.yahoo.com
> > >
> > >
> > >
> >
> -------------------------------------------------------
> > > This SF.net email is sponsored by: Tablet PC.
> > > Does your code think in ink? You could win a
> > Tablet PC.
> > > Get a free Tablet PC hat just for playing. What
> > are you waiting for?
> > >
> >
> http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
> > > _______________________________________________
> > > iText-questions mailing list
> > > [EMAIL PROTECTED]
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> > >
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to