Page 1 of 1

Direct2D ClipRectangle Problem

Posted: Wed May 16, 2012 12:39 pm
by 15661641
Dear Sir/Madam,

I use multi custom axes to draw Fastlines and user can zoom them vertically or horizantally.
As you know when using multiple axes and doing zoom or scroll, series points can display outside the axes "zones" or limits.
To prevent this I use BeforeDrawValues and AfterDrawValues event handlers.
In Windows XP (with GDI+) it works as I expected but in Windows 7 (with Direct2D) it crashes.
I think ClipRectangle function throws exception in Direct2D mode.
You can generate exception by editing your Demo2D project.
I added the following codes in Form2.cs in demo project.

Code: Select all

//Initiliaze charts
 protected override void InitializeCharts()
{
      // Add following lines
      fastLine.AfterDrawValues += lineSeries_AfterDrawValues;
      fastLine.BeforeDrawValues += lineSeries_BeforeDrawValues;
	  //Add another fastline's event handler
	  ...
	  tChart.Zoom.Direction = ZoomDirections.Vertical;
}
 private void lineSeries_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
    {
       if (g.Chart.Zoom.Zoomed)
       {
          FastLine s = sender as FastLine;
          int left = s.GetHorizAxis.IStartPos;
          int right = s.GetHorizAxis.IEndPos;
          int top = s.GetVertAxis.IStartPos;
          int bottom = s.GetVertAxis.IEndPos;
          g.ClipRectangle(left, top, right, bottom);
       }
    }
    private void lineSeries_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
    {
       g.ClearClipRegions();
    }
Is there a solution for this problem...

My TeeChart Version is: TeeChart for .NET 2012 4.1.2012.02280
OS is : Windows 7

Thanks for your helps...

Re: Direct2D ClipRectangle Problem

Posted: Fri May 18, 2012 2:22 pm
by yeray
Hi,

I'm afraid this isn't implemented yet in the Direct2D dll. I've added it to the wish list to be implemented (TD29016190).

Re: Direct2D ClipRectangle Problem

Posted: Mon May 21, 2012 5:22 am
by 15661641
Hi Yeray,

Is there an alternative method that I can use instead of "ClipRectangle" method...
Also what is the meaning of "wish list" ? How long do I have to wait? 1 month, 3 months, 1 year..

Re: Direct2D ClipRectangle Problem

Posted: Mon May 21, 2012 2:57 pm
by 10050769
Hello gcs,
Is there an alternative method that I can use instead of "ClipRectangle" method...
At the moment we aren't any alternative of this method.
Also what is the meaning of "wish list" ? How long do I have to wait? 1 month, 3 months, 1 year..
The feautre request is added it as "Serious" so its priority in quite high in the list but the time until we can fix it also depends on other variables such as the complexity of the problem, the number of issues with even higher priority that claims our team attention.
I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.

Thanks,