Drawing lines in OpenGL mode

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
JayG
Newbie
Newbie
Posts: 71
Joined: Mon Sep 04, 2006 12:00 am

Drawing lines in OpenGL mode

Post by JayG » Fri Sep 29, 2006 7:15 pm

The Steema.TeeChart.Drawing.Graphics3D.Line(p0,p1) method doesn't seem to work properly in OpenGL mode. The lines are drawn on the front face of the chart, no matter what the Z value of the points is.

Jay

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

Post by Narcís » Mon Oct 02, 2006 10:46 am

Hi Jay,

Thanks for reporting. I've been able to reproduce the issue here and added it (TF02011791) to our bug list to be fixed for future releases. It seems that 3D lines are not drawn properly when initial and final Z values are different.
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

JayG
Newbie
Newbie
Posts: 71
Joined: Mon Sep 04, 2006 12:00 am

Post by JayG » Thu Oct 05, 2006 8:45 pm

Hi,

I was using the same Z value for both points, and it was not drawn correctly.

Jay

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 Oct 06, 2006 7:53 am

Hi Jay,

Which TeeChart version are you using? It works fine here using the latest maintenance release available at the client area.
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

JayG
Newbie
Newbie
Posts: 71
Joined: Mon Sep 04, 2006 12:00 am

Post by JayG » Mon Oct 09, 2006 4:26 pm

I am using 2.0.2456.16162. I have tried setting the Z coordinate of the points to 0, TChart1.Aspect.Width3D, and TChart1.Aspect.Width3D/2. All three result in a line on the front of the chart.

Just for clarification, in open GL, would a Z value of 0 be at the front of the chart or the back of the chart?

Jay

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

Post by Narcís » Tue Oct 10, 2006 7:54 am

Hi Jay,
I am using 2.0.2456.16162. I have tried setting the Z coordinate of the points to 0, TChart1.Aspect.Width3D, and TChart1.Aspect.Width3D/2. All three result in a line on the front of the chart.

Just for clarification, in open GL, would a Z value of 0 be at the front of the chart or the back of the chart?


Z being zero is the front of the chart. The back of the chart Z value is 100. So this may solve your problem.

If the problem persists please send us an example we can run "as-is" to reproduce the problem here. You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
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

JayG
Newbie
Newbie
Posts: 71
Joined: Mon Sep 04, 2006 12:00 am

Post by JayG » Tue Oct 10, 2006 4:34 pm

I updated to 2.0.2469.25745 and I still have the same results. I have posted sample VB code to the attachments newsgroup. The subject is the same as this thread, "Drawing lines in OpenGL mode".

Jay
Last edited by JayG on Tue Oct 10, 2006 4:39 pm, edited 1 time in total.

JayG
Newbie
Newbie
Posts: 71
Joined: Mon Sep 04, 2006 12:00 am

Re: Drawing lines in OpenGL mode

Post by JayG » Tue Oct 10, 2006 4:37 pm

I only posted the VB code on the attachments newsgroup because when I tried to zip the whole project directory and attach it I got an error that the post was too large. Would you like the whole thing, just the source code, or some other combination of files?

Jay

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

Post by Narcís » Wed Oct 11, 2006 12:00 pm

Hi Jay,

Thanks for the code. With this file was enough to reproduce the problem here. I guess, your problem is very similar to what I said as you use Calc3DPos for converting to 3D points to 2D points. I've included your code to the bug list item to be reviewed.

In the meantime you can use the code below which works fine.

Code: Select all

        For WhichSegment = 1 To TChart1.Series(1).Count - 1 'loop throught the points in the series            
            APoint = New Point(TChart1.Series(1).CalcXPosValue(TChart1.Series(1).XValues(WhichSegment - 1)), TChart1.Series(1).CalcYPosValue(TChart1.Series(1).YValues(WhichSegment - 1)))
            BPoint = New Point(TChart1.Series(1).CalcXPosValue(TChart1.Series(1).XValues(WhichSegment)), TChart1.Series(1).CalcYPosValue(TChart1.Series(1).YValues(WhichSegment)))
            g.Line(APoint, BPoint, 100)
        Next WhichSegment
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