Page 1 of 1
Circle shape center at invalid position
Posted: Mon Oct 26, 2009 1:39 pm
by 9244864
Hello !
I use TChart 7.12 and have have problems with a TLineseries, if I set its SeriesPointer->Style = psCircle.
HorizSize and VertSize to the same so that I should get circles.
1. For small sizes 3-7 the cicle shapes does not look very beautifull as a circle
Should the shape not be symmetic in x and y directions?
Especial if I use no borderline they are are frayed and ugly.
E.g. Size=5
..x.... <- Why this pixel
.xxxx.
xxxxxx
xxxxxx
xxxxxx
xxxxxx
. xxxx
2. In no borders mode they look like shifted 1-2 pixel to the top/left corner.
(I have a straight line fit of some points and the fit looks bad although the numbers are correct.)
Point 1 is very unclear for me. Why is the shape no symmetic in x and y direction?
Tries tchart to draw the full circle shape in world-coordiantes
and the strange points are rounding effects???
Bye
Andreas
Re: Circle shape center at invalid position
Posted: Mon Oct 26, 2009 2:56 pm
by yeray
Hi Andreas,
Could you please modify the following if that doesn't reproduce the problem?
Code: Select all
var Series1: TLineSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1 := Chart1.AddSeries(TLineSeries.Create(self)) as TLineSeries;
Chart1.View3D := false;
Series1.FillSampleValues();
Series1.Pointer.Visible := true;
Series1.Pointer.Style := psCircle;
Series1.Pointer.HorizSize := 5;
Series1.Pointer.VertSize := 5;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Series1.Pointer.Pen.Visible := not Series1.Pointer.Pen.Visible;
end;
Also, please attach a picture (or more than one) of the result you are getting indicating what pixels you don't expect to be drawn, where you see the asymmetry,...
Re: Circle shape center at invalid position
Posted: Mon Oct 26, 2009 4:16 pm
by 9244864
Hello Yeray !
Yes, I use code like this.
The example I tried to show in the ASCII-Fomat I cannot reproduce.
(May be I had linewidth 2, then I get such results)
In the 3 attached examples you can see 2 asymmetic circles
and one at the coordinates (0,0). Here you see the x/y grid of the chart,
at red line starting at (0,0), too.
You can reproduce all with the TChartPro7-Demo-Program.
Bye
Andreas
Re: Circle shape center at invalid position
Posted: Tue Oct 27, 2009 12:20 pm
by yeray
Hi Andreas,
Where have you sent those examples?¿
You can either attach your files them directly here at the forums, at news://
www.steema.net/steema.public.attachments newsgroup or at our
upload page.
Re: Circle shape center at invalid position
Posted: Tue Oct 27, 2009 1:18 pm
by 9244864
I had uploaded the files with the webinterface - The "upload attachment" tabpage.
But I do not really understand this function.
Are the files connected to the current discussion thread and where one can find them?
I uploaded it again at your upload page, now!
Re: Circle shape center at invalid position
Posted: Tue Oct 27, 2009 3:11 pm
by yeray
Hi Andy,
First of all, are you sure you've submitted the attachments in this forums without any error? Here are the steps:
1- Click on the reply button to open the replying text box.
2- Click on "Upload attachment" tab.
3- Click on "Browse..." and select the file you want to attach.
4- Write a comment in the according text box if you want.
5- Click on Add the file and wait until the file is uploaded.
6- Repeat the steps from point 3 for all the files you want to attach (Note that you could add several in a .zip file and attach all them at the same time).
And regarding the pixels, please note that TeeChart uses VCL primitives to draw rectangles, circles, lines, text,... so this will probably be a VCL problem related to rounding when a the environment has to calculate the pixels to paint in each colour to achieve each form.
On the other hand, you could try using Antialias or OpenGL that would probably give you more "perfect" circles and lines.
Re: Circle shape center at invalid position
Posted: Wed Oct 28, 2009 8:20 am
by 9244864
Thank you for the help.
I uploaded the files again.
I made "hardcopys" of some chart areas with a lense tools.
Maybe you can take a look on it and find out if its is a vcl-problem.
The circle_move_error.bmp shows a point at coordinate (0,0), but it doesnt look so.
Bye
Andreas
Re: Circle shape center at invalid position
Posted: Wed Oct 28, 2009 11:42 am
by yeray
Hi Andreas,
Yes, I saw the pictures you sent through the upload page.
I think that one pixel displacement to the left and one to the top is due to the internal rounding.
Have you tried with Antialias or OpenGL?