Re: [wxCode-users] centering a string to a point with wxPdfDoc

2009-03-12 Thread Ulrich Telle
Luca Cappa schrieb: >> I consider to change the coordinate system in a future version of >> wxPdfDocument to make the behaviour of several methods more logical and >> transparent. > > That is a very good news to me, thanks! Thanks for the positive reaction. Not all users of wxPdfDocument see it

Re: [wxCode-users] centering a string to a point with wxPdfDoc

2009-03-12 Thread Luca Cappa
Hello, On Thu, 12 Mar 2009 14:30:18 +0100, Ulrich Telle wrote: > As you observed the y position corresponds > roughly to the upper left corner of the text box. The baseline of the > font is positioned half of the cell height plus 30% of the font size in > user units below, i.e. > > y_baseline =

Re: [wxCode-users] centering a string to a point with wxPdfDoc

2009-03-12 Thread Ulrich Telle
Luca Cappa schrieb: >> The y position corresponds to the baseline of the font. T > > I expect you to correct me again :) No, I have to correct myself. As you observed the y position corresponds roughly to the upper left corner of the text box. The baseline of the font is positioned half of the

Re: [wxCode-users] centering a string to a point with wxPdfDoc

2009-03-12 Thread Luca Cappa
Hello, On Wed, 11 Mar 2009 21:00:40 +0100, Ulrich Telle wrote: > Luca Cappa schrieb: >> I wrote a simple function which draws a string with the its bounding box >> centered to the given pCenter parameter: >> >> void drawCenteredText (wxPdfDocument& pPDF, wxString const& pString, >> Vector2f cons

Re: [wxCode-users] centering a string to a point with wxPdfDoc

2009-03-11 Thread Ulrich Telle
Luca Cappa schrieb: > I wrote a simple function which draws a string with the its bounding box > centered to the given pCenter parameter: > > void drawCenteredText (wxPdfDocument& pPDF, wxString const& pString, > Vector2f const& pCenter) > { >float lHeightMM = float (pPDF.GetFontSize ()) /