Page 1 of 1
point size
Posted: Thu Jan 10, 2008 3:37 pm
by 9339785
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
Posted: Thu Jan 10, 2008 3:57 pm
by narcis
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.
Posted: Fri Jan 11, 2008 8:20 am
by 9339785
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
Posted: Fri Jan 11, 2008 10:08 am
by narcis
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.