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
point size
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
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
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Franck,
Yes, this is most likely because pointer rectangles are drawn like this:
where:
and tmpHoriz=HorizSize and tmpVer=VertSize.
I'll add your request to our wish-list to be reviewed and enhanced for future releases.
Yes, this is most likely because pointer rectangles are drawn like this:
Code: Select all
Rectangle(PXMinus,PYMinus,PXPlus+1,PYPlus+1);
Code: Select all
PXMinus:=PX-tmpHoriz;
PXPlus :=PX+tmpHoriz;
PYMinus:=PY-tmpVert;
PYPlus :=PY+tmpVert;
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 |
Instructions - How to post in this forum |