Page 1 of 1

Line Colors on WPF Alpha

Posted: Mon Mar 10, 2008 6:10 pm
by 13046638
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

Re: Line Colors on WPF Alpha

Posted: Tue Mar 11, 2008 2:24 pm
by Chris
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();
		}

Posted: Tue Mar 11, 2008 2:59 pm
by 13046638
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.

Posted: Tue Mar 11, 2008 4:08 pm
by Chris
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.