point size

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

point size

Post by franckgar » Thu Jan 10, 2008 3:37 pm

Hi,
I have a pb with the size of the point of TLineSeries.
When I set
Pointer.HorizSize = 1
Pointer.VertSize= 1
the true size of the points is 2 pixels,

when I set
Pointer.HorizSize = 2
Pointer.VertSize= 2
the true size of the points is 4 pixels

when I set
Pointer.HorizSize = 3
Pointer.VertSize= 3
the true size of the points is 6 pixels, and so on.

So how can I have fix point size to 1, 2, 3, 4, ... (and not 2, 4, 6) ?
Thanks
Franck

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

Post by Narcís » Thu Jan 10, 2008 3:57 pm

Hi Franck,

I'm afraid this is not possible. The pointer drawing algorithm centers the pointer on the series X,Y values and then draws the pointer from X-HorizSize to X+HorizSize and Y-VertSize to Y+VertSize. Screen pixels are not floating point values and therefore what you request is not possible.

For example, implementing what you request you could draw a pointer with HorizSize and VertSize = 3 from X-1 to X+1 and Y-1 to Y+1. This would make a 3x3 pixels pointer. However, how would you expect a 2*2 pointer being drawn? It would make the impression that pointers are little shifted from actual series values.
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

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Post by franckgar » Fri Jan 11, 2008 8:20 am

ok, I understand.
But in this case there is a problem with the point frame. When you set TLineSeries.Pointer.Frame.Visible := TRUE (with size=1), the points are increased of only 1 pixel, but according to your theory it should have been increased of 2 pixels.
As you said "it make the impression that pointers are little shifted from actual series values".

Franck

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 Jan 11, 2008 10:08 am

Hi Franck,

Yes, this is most likely because pointer rectangles are drawn like this:

Code: Select all

                    Rectangle(PXMinus,PYMinus,PXPlus+1,PYPlus+1);
where:

Code: Select all

  PXMinus:=PX-tmpHoriz;
  PXPlus :=PX+tmpHoriz;
  PYMinus:=PY-tmpVert;
  PYPlus :=PY+tmpVert;
and tmpHoriz=HorizSize and tmpVer=VertSize.

I'll add your request to our wish-list to be reviewed and enhanced for future releases.
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