DrawAllPoints
-
- Newbie
- Posts: 6
- Joined: Mon Dec 20, 2004 5:00 am
DrawAllPoints
Hi,
the DrawAllPoints property leads to a slow reaction if true and a high number of points. But if DrawAllPoints is switched off the resulting curve quite often looks weird.
So I propose to modify the DrawValues procedure in Series.pas:
1) add 4 new variables in the TFastLineSeries class definition in section {internal}:
minpoint : Integer; // new variable
maxpoint : Integer; // new variable
minpointdefined : Boolean; // new variable
maxpointdefined : Boolean; // new variable
2) modify the DrawValues procedure:
procedure TFastLineSeries.DrawValue(ValueIndex:Integer);
var X : Integer;
Y : Integer;
begin
CalcPosition(ValueIndex,X,Y);
if X=OldX then
begin
if (Y=OldY) then exit;
if (not DrawAllPoints) then
begin
if minpointdefined and maxpointdefined then
begin
if (Y > minpoint) and (Y < maxpoint) then exit
else
if Y > maxpoint then maxpoint := Y;
if Y < minpoint then minpoint := Y;
end
else
if minpointdefined and not maxpointdefined then
begin
if Y > minpoint then maxpoint := Y; maxpointdefined := true;
if Y < minpoint then
begin
maxpoint := minpoint; minpoint := Y; maxpointdefined := true;
end;
end
else
begin
minpoint := Y;
minpointdefined := true;
end;
end;
end
else
begin
minpointdefined := false;
maxpointdefined := false;
end;
if IgnoreNulls or (ValueColor[ValueIndex]<>clNone) then
begin
With ParentChart.Canvas do
if ParentChart.View3D then
begin
if Stairs then
if InvertedStairs then LineTo3D(OldX,Y,MiddleZ)
else LineTo3D(X,OldY,MiddleZ);
LineTo3D(X,Y,MiddleZ);
end
else
begin
if Stairs then
if InvertedStairs then LineTo(OldX,Y)
else LineTo(X,OldY);
LineTo(X,Y);
end;
end
else DoMove(X,Y);
OldX:=X;
OldY:=Y;
end;
With this modification it is checked if a new point to be drawn is at an existing x position. If yes then it is checked if it is between minpoint and maxpoint or outside. If it is inside then the new point is not drawn. If it is outside then it is drawn and minpoint/maxpoint are adjusted accordingly.
By this modification the drawed curve is always looking perfect like with all points drawn. The disadvantage is that e.g. a curve with a continous rising/falling slope is is not drawn quicker. But more random curves are drawn very quick under statistical aspects.
Now the reason for my post:
I would like to have this code in V7.08 which is binary only. In V7.07 source code it is possible but V7.07 is different to V7.08, so I get error messages about different compilations together with other used software libraries.
Uli
the DrawAllPoints property leads to a slow reaction if true and a high number of points. But if DrawAllPoints is switched off the resulting curve quite often looks weird.
So I propose to modify the DrawValues procedure in Series.pas:
1) add 4 new variables in the TFastLineSeries class definition in section {internal}:
minpoint : Integer; // new variable
maxpoint : Integer; // new variable
minpointdefined : Boolean; // new variable
maxpointdefined : Boolean; // new variable
2) modify the DrawValues procedure:
procedure TFastLineSeries.DrawValue(ValueIndex:Integer);
var X : Integer;
Y : Integer;
begin
CalcPosition(ValueIndex,X,Y);
if X=OldX then
begin
if (Y=OldY) then exit;
if (not DrawAllPoints) then
begin
if minpointdefined and maxpointdefined then
begin
if (Y > minpoint) and (Y < maxpoint) then exit
else
if Y > maxpoint then maxpoint := Y;
if Y < minpoint then minpoint := Y;
end
else
if minpointdefined and not maxpointdefined then
begin
if Y > minpoint then maxpoint := Y; maxpointdefined := true;
if Y < minpoint then
begin
maxpoint := minpoint; minpoint := Y; maxpointdefined := true;
end;
end
else
begin
minpoint := Y;
minpointdefined := true;
end;
end;
end
else
begin
minpointdefined := false;
maxpointdefined := false;
end;
if IgnoreNulls or (ValueColor[ValueIndex]<>clNone) then
begin
With ParentChart.Canvas do
if ParentChart.View3D then
begin
if Stairs then
if InvertedStairs then LineTo3D(OldX,Y,MiddleZ)
else LineTo3D(X,OldY,MiddleZ);
LineTo3D(X,Y,MiddleZ);
end
else
begin
if Stairs then
if InvertedStairs then LineTo(OldX,Y)
else LineTo(X,OldY);
LineTo(X,Y);
end;
end
else DoMove(X,Y);
OldX:=X;
OldY:=Y;
end;
With this modification it is checked if a new point to be drawn is at an existing x position. If yes then it is checked if it is between minpoint and maxpoint or outside. If it is inside then the new point is not drawn. If it is outside then it is drawn and minpoint/maxpoint are adjusted accordingly.
By this modification the drawed curve is always looking perfect like with all points drawn. The disadvantage is that e.g. a curve with a continous rising/falling slope is is not drawn quicker. But more random curves are drawn very quick under statistical aspects.
Now the reason for my post:
I would like to have this code in V7.08 which is binary only. In V7.07 source code it is possible but V7.07 is different to V7.08, so I get error messages about different compilations together with other used software libraries.
Uli
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Uli,
Thanks for your suggestion. I'll add it to our wish-list to be reviewed and considered for inclusion in future releases.
Anyway, which errors do you get?
Thanks for your suggestion. I'll add it to our wish-list to be reviewed and considered for inclusion in future releases.
It's not most likely to happen since we are currently working on TeeChart v8 VCL and it's most un-likely that a new v7 VCL maintenance will be released. However, we released v7.08 version for Delphi 2006 only to fix an issue existing with the help file system in D2006.Now the reason for my post:
I would like to have this code in V7.08 which is binary only. In V7.07 source code it is possible but V7.07 is different to V7.08, so I get error messages about different compilations together with other used software libraries.
Anyway, which errors do you get?
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 |
-
- Newbie
- Posts: 6
- Joined: Mon Dec 20, 2004 5:00 am
Hi Narcís,
I would like if you can confirm if my proposal is welcome and included in future releases as I do not have to implement it everytime by myself
Now in the meantime I have got the V7.07 source code working. The problem was that the installer of the V7.08 binary code does the installation quite well. But it does not uninstall the TEEINCPATH and TEELIBPATH environment variables. Thus after installing the V7.07 package I got further compilation errors as the environment variables simply kept pointing to the wrong library.
You should change it
Uli
I would like if you can confirm if my proposal is welcome and included in future releases as I do not have to implement it everytime by myself
Now in the meantime I have got the V7.07 source code working. The problem was that the installer of the V7.08 binary code does the installation quite well. But it does not uninstall the TEEINCPATH and TEELIBPATH environment variables. Thus after installing the V7.07 package I got further compilation errors as the environment variables simply kept pointing to the wrong library.
You should change it
Uli
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Uli,
All suggestions are welcomed and for sure it will be considered for inclusion but I can't still confirm what will be included and what won't since we have a very long list of requests. You should be aware at new versions release notes.I would like if you can confirm if my proposal is welcome and included in future releases as I do not have to implement it everytime by myself
I think this has already been improved for v8's installer.Now in the meantime I have got the V7.07 source code working. The problem was that the installer of the V7.08 binary code does the installation quite well. But it does not uninstall the TEEINCPATH and TEELIBPATH environment variables. Thus after installing the V7.07 package I got further compilation errors as the environment variables simply kept pointing to the wrong library.
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 |
-
- Newbie
- Posts: 6
- Joined: Mon Dec 20, 2004 5:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Uli,
Yes, I sent you the information to beta-test v8 at your forums contact e-mail address.
Yes, I sent you the information to beta-test v8 at your forums contact e-mail address.
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 |
-
- Newbie
- Posts: 6
- Joined: Mon Dec 20, 2004 5:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Uli,
Yes, I checked it and it was sent. I resent the e-mail again to your forums contact e-mail address. It could be that the message got trapped by anti-spam filter? If you want you can let us know an alternative e-mail address where to send the info?
Yes, I checked it and it was sent. I resent the e-mail again to your forums contact e-mail address. It could be that the message got trapped by anti-spam filter? If you want you can let us know an alternative e-mail address where to send the info?
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 |
-
- Newbie
- Posts: 6
- Joined: Mon Dec 20, 2004 5:00 am
Dear Narcís,
it seems that there is a problem.
Can you please use uli.brueggemann@gmail.com ?
Thanks
Uli
it seems that there is a problem.
Can you please use uli.brueggemann@gmail.com ?
Thanks
Uli
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Dear Uli,
Yes, I've just sent it there.
Yes, I've just sent it there.
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 |
-
- Newbie
- Posts: 6
- Joined: Mon Dec 20, 2004 5:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Uli,
Unfortunately you can only install one TeeChart version in each IDE.
Unfortunately you can only install one TeeChart version in each IDE.
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 |