2 bugs: Series.Clicked() & font rendering

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bert B.
Newbie
Newbie
Posts: 69
Joined: Fri Jun 15, 2007 12:00 am

2 bugs: Series.Clicked() & font rendering

Post by Bert B. » Wed Apr 20, 2011 8:55 am

Hello,

I discovered 2 bugs (going from version 7.12 to 2011.03.30407) that are demonstrated in the attachment:
1) Click a line and see what .Clicked() returns. Version 7.12 counts from 0 and version 2011 counts from 1.
2) In version 7.12 the fonts are rendered with ClearType, in version 2011 they are not.

Regards,
Bert
TeeChart7.12.png
TeeChart7.12.png (19.17 KiB) Viewed 9546 times
TeeChart2011.png
TeeChart2011.png (21.63 KiB) Viewed 9541 times
Attachments
TeeChartClicked.rar
(1.24 KiB) Downloaded 595 times

Bert B.
Newbie
Newbie
Posts: 69
Joined: Fri Jun 15, 2007 12:00 am

Re: 2 bugs: Series.Clicked() & font rendering

Post by Bert B. » Thu Apr 21, 2011 8:21 am

Another weird thing you may notice here that if you don't explicitly set the color to clRed it will get another color at runtime.

Yeray
Site Admin
Site Admin
Posts: 9538
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: 2 bugs: Series.Clicked() & font rendering

Post by Yeray » Thu Apr 21, 2011 10:08 am

Hello Bert,
Bert B. wrote:1) Click a line and see what .Clicked() returns. Version 7.12 counts from 0 and version 2011 counts from 1.
Yes, I see in v2010.01 it still worked as you want, taking the index of the left point. And I see from v2010.02 it takes the index of the right point.
I've added it to the wish list to be investigated for future releases (TV52015540).
Bert B. wrote:2) In version 7.12 the fonts are rendered with ClearType, in version 2011 they are not.
I think this is relative to an existing item in the wish list (TV52015253).
In the meanwhile you can workaround this adding the TeCanvas unit t the uses clause and setting the TeeFontAntiAlias as follows:

Code: Select all

TeeFontAntiAlias:=DEFAULT_QUALITY;
Bert B. wrote:Another weird thing you may notice here that if you don't explicitly set the color to clRed it will get another color at runtime.
This is by design. We changed the default color palette to be used in new series to the OperaPalette.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bert B.
Newbie
Newbie
Posts: 69
Joined: Fri Jun 15, 2007 12:00 am

Re: 2 bugs: Series.Clicked() & font rendering

Post by Bert B. » Thu Apr 21, 2011 10:27 am

Thanks for your answers.
I have modified my code and applied the workaround.

Yeray
Site Admin
Site Admin
Posts: 9538
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: 2 bugs: Series.Clicked() & font rendering

Post by Yeray » Thu Apr 21, 2011 2:00 pm

Hello Bert,

Regarding to the clicked problem [TV52015540]. We've just fixed it in the sources.
If you are source code customer, you can apply the fix yourself in the Series.pas. See bellow a portion of the ClickedPoint function (nested function in TCustomSeries.Clicked function):

Code: Select all

     if (Index>=tmpFirst) and ClickableLine then
       if CheckPointInLine or (FDrawArea and PointInArea(Index)) then
         if GetHorizAxis.Inverted then
            result:=Succ(Index)
         else
            result:=Index;
Chang the last line on it to have the following:

Code: Select all

     if (Index>=tmpFirst) and ClickableLine then
       if CheckPointInLine or (FDrawArea and PointInArea(Index)) then
         if GetHorizAxis.Inverted then
            result:=Succ(Index)
         else
            result:=Pred(Index);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bert B.
Newbie
Newbie
Posts: 69
Joined: Fri Jun 15, 2007 12:00 am

Re: 2 bugs: Series.Clicked() & font rendering

Post by Bert B. » Tue Sep 13, 2011 12:36 pm

Yeray wrote:
Bert B. wrote: Another weird thing you may notice here that if you don't explicitly set the color to clRed it will get another color at runtime.
This is by design. We changed the default color palette to be used in new series to the OperaPalette.
This design change causes problems in Delphi 2010 (and maybe other versions). Take the example program and set the color of the LineSerie to clRed.
Now switch the form to text view (Alt+F12) and notice that SeriesColor is set to clRed. Switch back to form view.
At this time the property is lost although the lineserie is still shown in red. (You can confirm this by switching to text view again.) When you run the application the lineserie is blue again.
The color clRed is still regarded as the default color and does not get stored in the DFM.

Bert

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: 2 bugs: Series.Clicked() & font rendering

Post by Sandra » Wed Sep 14, 2011 1:56 pm

Hello Bert,

It is a know problem for us(TV52015546), how we have explained in this post. I recommend you to be aware at the following channels for new release announcements and what's implemented on them:
- Support forum.
- RSS news feed
- Twitter
- Facebook
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply