Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 customBrush in ChartAttribute is not used
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

matze p

1 Posts

Posted - 24 Aug 2007 :  08:37:38  Show Profile  Reply with Quote
Setting a Custom brush using the method ChartAttribute.SetCurrentBrush() seems to have no effect on painting (e.g. for filling the bars in a SimpleBarPlot). There might be a bug in the Copy method of ChartAttribute (QCChart2DNet.dll 1.6.1.8). The customBrush is not copied. In comparision with the QCChart3DNet.dll the customBrush is copied.

Is there a way to set a custom brush for filling the bars in a bar chart?

Thanks.

quinncurtis

1164 Posts

Posted - 24 Aug 2007 :  10:35:50  Show Profile  Reply with Quote
You correct, both in identifying the bug, and the solution. I believe you have the source, so you can correct it with the following lines in the ChartAttribute class.

public void Copy( ChartAttribute source) 
{
  if (source != null) 
  {
    .
    .
    .
// add the next two lines
    customPen = source.customPen;
    customBrush = source.customBrush;

    UpdateAttributes();
   }
}


You will want to add the same two lines to one of the constructors:

public ChartAttribute(ChartAttribute attr) 
{
       .
       .
       .
	customPen = attr.customPen;
	customBrush = attr.customBrush;
	UpdateAttributes();
}


We will update the software with these change and post a new version by the end of next week.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07