![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | [TD29016645] There is a strange problem when you do Ctrl+Alt+Supr with Direct2D de... | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | sandra pazos <sandra> |
| Component: | Direct2D | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | IN_PROGRESS --- | ||
| Severity: | major | CC: | henrik.surm+bugzilla |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: | Screenshot of the Direct2D error | ||
Created attachment 37 [details]
Screenshot of the Direct2D error
(In reply to chris ireland from comment #0) > And also I have attached an image where you see the error there appears in > the project in the design time. > Thread: http://www.teechart.net/support/viewtopic.php?f=4&t=14198 > [created:2013-07-17T12:09:00.000+01:00 reported by:sandra@steema.com > reported in version:] Have been able to reproduce this error here using the SlimDX source code. The error is shown in the attached screenshot. The error seems to be coming from Direct2D itself and not from either the SlimDX or the TeeChart API. I have been unable to find a resolution to this problem for the moment. I found a workaround for this problem. Subclass TChart, catch the exception in OnPaint an recreate the Graphics3D object:
using System.Windows.Forms;
using SlimDX.Direct2D;
using Steema.TeeChart;
using Steema.TeeChart.Drawing.Direct2D;
public class TChartEx : TChart
{
protected override void OnPaint(PaintEventArgs pe)
{
try
{
base.OnPaint(pe);
}
catch (Direct2DException e)
{
if (e.ResultCode == ResultCode.RecreateTarget)
{
var oldGraphics = Graphics3D;
Graphics3D = new Graphics3DDirect2D(Chart);
// Copy properties of old Graphics object
Graphics3D.BufferStyle = oldGraphics.BufferStyle;
Graphics3D.BackColor = oldGraphics.BackColor;
Graphics3D.Brush = oldGraphics.Brush;
Graphics3D.Font = oldGraphics.Font;
Graphics3D.FourPoints = oldGraphics.FourPoints;
Graphics3D.Gradient = oldGraphics.Gradient;
Graphics3D.NameElements = oldGraphics.NameElements;
Graphics3D.Pen = oldGraphics.Pen;
Graphics3D.RotationCenter = oldGraphics.RotationCenter;
Graphics3D.RotationCenterFloat = oldGraphics.RotationCenterFloat;
Graphics3D.SmoothingMode = oldGraphics.SmoothingMode;
Graphics3D.Supports3DText = oldGraphics.Supports3DText;
Graphics3D.SupportsID = oldGraphics.SupportsID;
Graphics3D.Tag = oldGraphics.Tag;
// Add more properties if needed
oldGraphics.Dispose();
}
else
throw;
}
}
}
|
There is a strange problem when you do Ctrl+Alt+Supr with Direct2D demo project. To reproduce the problem with demo, you need follow next steps: 1.- Open Demo Direct2D 2.- Do Ctrl+Alt+Supr 3.- Return to the session. A similar problem occurs if you run the attach project and open Task Manager, doing ctrl+Alt+Supr, when the project is running. The problem causes and exception in the method ShowImage public override void ShowImage(Graphics g) { if (!gd.IsOccluded) { gd.EndDraw(); } //DisposeObj(); base.ShowImage(g); } And also I have attached an image where you see the error there appears in the project in the design time. Thread: http://www.teechart.net/support/viewtopic.php?f=4&t=14198 [created:2013-07-17T12:09:00.000+01:00 reported by:sandra@steema.com reported in version:]