Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 276 - [TV52015997] TeeChart's TeeSaveToPDFFile function does not work reliable, since a ...
Summary: [TV52015997] TeeChart's TeeSaveToPDFFile function does not work reliable, sin...
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Export (show other bugs)
Version: unspecified
Hardware: All All
: Normal enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 15:29 EST by yeray alonso
Modified: 2013-11-20 10:35 EST (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2013-11-20 10:35:54 EST
TeeChart's TeeSaveToPDFFile function does not work reliable, since a random gap is drawn between characters of text. Only if this gap is 0, output is OK.
Inspecting the source code, I found the following lines in TeePDFCanvas.pas, in the procedure TPDFCanvas.RotateLabel(x,y:Integer; Const St:String; RotDegree:Double):
        if Assigned(IFont) then
           WriteStringToStream(FCStream,FontProperties(IFont,FontIndex)+' ')
        else
           WriteStringToStream(FCStream,FontProperties(TTeeFont(Font),FontIndex)+' ');

The last line is critical, since it misses a dynamic type check whether Font is actually a TTeeFont. If Font is not a TTeeFont, the Font's InterCharSize property returns a random value in function FontProperties which causes the random gap to be drawn.
I would suggest to add the dynamic type check and overload function FontProperties accordingly.
http://www.teechart.net/support/viewtopic.php?f=3&t=12930&p=56084#p56084 [created:2012-01-09T15:29:20.000+01:00 reported by:yeray@steema.com reported in version:2011.04.41118 (TeeChart VCL)]