SmallDots and D2005

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

SmallDots and D2005

Post by Mariano » Fri Apr 15, 2005 11:06 am

The property SmallDots doesn't work on D2005 SP2 (with TChart 7.04)

Serching in TeCanvas.pas I see that in function TeeSetTeePen are these lines of code:

if APen.SmallDots then
begin
// Delphi 2005 VCL .Net and Win32 bug.
// TPen.GetPenData uses TLogPen instead of TExtLogPen
// Workaround for Delphi 2005: Set "psDot" style
// Another Delphi 2005 VCL Bug: Setting Pen.Handle leaks GDI Object.

{$IFDEF D9}
FPen.Color:=AColor;
FPen.Style:=psDot;
FPen.Mode:=APen.Mode;

if TeeCheckPenWidth then FPen.Width:=0
else FPen.Width:=1;

{$ELSE}
FPen.Handle:=TeeCreatePenSmallDots(AColor);
FPen.Mode:=APen.Mode; // 6.02
{$ENDIF}
end

But, if I use:

FPen.Handle:=TeeCreatePenSmallDots(AColor);
FPen.Mode:=APen.Mode; // 6.02

Every seems to work fine.

What's wrong with these lines? It's very important for me to continue using de property smalldots the same way I used in D7.

Thanks in advance,
Mariano

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Apr 15, 2005 11:39 am

Hola Mariano,

Yes, you are right, it's a leftover from D2005 and D2005 Update Pack 1. This bug was fixed with Update Pack 2 but we forgot to remove the D9 ifdef part.

Anyway it had already been fixed for the next release where a new ifdef is included for those users who don't use D2005 UP2 ({$IFDEF D9WITHOUTUPDATE2}). In the meantime, you can also comment out those lines as you are already using UP2.
Best Regards,
Narcís Calvet / 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

Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

Post by Mariano » Fri Apr 15, 2005 12:41 pm

Thanks for your answer.

I have another question. Can I comment out all these lines (marked with $ifdef D9} in TeeSetTeePen or only the ones related to SmallDots?

Best regards,
Mariano

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Apr 15, 2005 1:42 pm

Hola Mariano,

You should better leave other ifdefs as they are, just modifying TeeSetTeePen as you suggested. I've already e-mailed you the complete modified implementation of this procedure.
Best Regards,
Narcís Calvet / 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