Line Colors on WPF Alpha

TeeChart Beta versions
Post Reply
ITUser
Newbie
Newbie
Posts: 5
Joined: Fri Sep 07, 2007 12:00 am
Contact:

Line Colors on WPF Alpha

Post by ITUser » Mon Mar 10, 2008 6:10 pm

When using the following code:

Code: Select all

           
            Line newLine = new Line()
            {
                Color = input.Color,
            };
The colors are displayed far darker then they should.

For example:

Code: Select all

            Rectangle r = new Rectangle()
            {
                Background = new SolidColorBrush(Colors.Cyan)
            }

            Line newLine = new Line()
            {
                Color = Colors.Cyan,
            };
Aqua on the Rectangle is the proper color while the Line will be darker so much darker that it is no longer the same color.

I believe this is caused by some sort of extra values that can be set on the line but I do not know what those values are. I know in the Win32 version there were some values that needed to be set in the Pen Tool to get the colors to show correctly.

Furthermore I have discovered that FastLine shows color correctly and I attribute this to it simply lacking the functions that Line has which causes the darker color.

Any ideas on how to improve the color of Line would be greatly appreciated.

Regards,
Michael Hohlios

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: Line Colors on WPF Alpha

Post by Christopher » Tue Mar 11, 2008 2:24 pm

Hello Michael,
Michael Hohlios wrote: Any ideas on how to improve the color of Line would be greatly appreciated.
I'm not sure which versions you're using, but in the latest publicly available version of TeeChart for .NET v3 and in the version of TeeChart.WPF I am working on, code similar to the following produces identical colours:

Code: Select all

	private FastLine fastLine1;
		private Line line1;

		private void InitializeChart()
		{
			tChart1.Aspect.View3D = false;
			tChart1.Series.Add(fastLine1 = new FastLine());
			fastLine1.Color = Color.Yellow;

			tChart1.Series.Add(line1 = new Line());
			line1.Color = Color.Yellow;

			fastLine1.FillSampleValues();
			line1.FillSampleValues();
		}
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

ITUser
Newbie
Newbie
Posts: 5
Joined: Fri Sep 07, 2007 12:00 am
Contact:

Post by ITUser » Tue Mar 11, 2008 2:59 pm

Sorry I dont think I was very clear.

I was using "Line" and I noticed the colors are off. I thought that it might be because of Dark3D but even with it off the colors are very dark.

Since then I switched to "FastLine" and it works great. I just thought that you would like to know that "Line" somehow is not setting colors correctly.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Mar 11, 2008 4:08 pm

Hello,
13046638 wrote:Sorry I dont think I was very clear.

I was using "Line" and I noticed the colors are off. I thought that it might be because of Dark3D but even with it off the colors are very dark.

Since then I switched to "FastLine" and it works great. I just thought that you would like to know that "Line" somehow is not setting colors correctly.
Yes, thank you, I think you communicated the above effectively to me. What I was trying to say is that in the TeeChart.WPF.dll I am working on here, which is several stages more advanced than the one you have and is not publicly available yet, the Line is setting its colours fine as in the example code I sent above.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply