Specifically, the height of the textblock returned from ShowTextBlock seems to be incorrect.
For example, if I position a TextBlock at 0,0 (lower left of page),
then rotate it 90 degrees (counterclockwise)
I would expect the top edge of my text to be placed exactly on the left edge of my page.
However, it is always inside the edge (to the right of the page edge) like this:
This is how I'm using ShowTextBlock (pertinent code shown):
Code: Select all
// Set the rect at 0,0
PXC_Rect pRect;
pRect.top = 0;
pRect.left = 0;
pRect.bottom = -100;
pRect.right = pageWidth;
nFlags = (uint)PXC_DrawTextFlags.DTF_RichText;
//turn on CalcSizeOnly
nFlags = nFlags | (uint)PXC_DrawTextFlags.DTF_CalcSizeOnly;
contentCreator.ShowTextBlock(...);
contentCreator.RotateCS(90.0);
contentCreator.TranslateCS(0,0);
//turn off CalcSizeOnly
nFlags = nFlags ^ (uint)PXC_DrawTextFlags.DTF_CalcSizeOnly;
contentCreator.ShowTextBlock(...);
How can I position the TextBlock to meet he page edge regardless of the font size?
Note also that when I place a TextBlock at the bottom of my page and move it up by the height
(returnedRect.top - returnedRect.bottom)
it is not enough. The returned values for the text height do not seem to be accurate. Notice that
the descender of the "p" in "plus" is cut off, as are parts of all text on the bottom line.