Steema Issues Database

Note: 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.



Bug 358 - [TD29016190] Clipping doesn't seem to be implemented in Direct2D. I see Graphics3D...
Summary: [TD29016190] Clipping doesn't seem to be implemented in Direct2D. I see Graph...
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Direct2D (show other bugs)
Version: unspecified
Hardware: All All
: Normal major
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-18 17:22 EDT by yeray alonso
Modified: 2013-11-28 06:39 EST (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2013-11-20 11:25:28 EST
Clipping doesn't seem to be implemented in Direct2D. I see Graphics3DDirect2D's SetClipRegion, FillRegion, ClearClipRegions methods TODO.
http://www.teechart.net/support/viewtopic.php?f=4&t=13291&p=57884#p57884
Example below similar to the "Opaque zones" demo:
        Steema.TeeChart.TChart tChart1;
        private void CreateChart()
        {
            tChart1 = new Steema.TeeChart.TChart();
            this.Controls.Add(tChart1);
            Steema.TeeChart.ChartController tChartController1 = new Steema.TeeChart.ChartController();
            this.Controls.Add(tChartController1);
            tChartController1.Chart = tChart1;
            tChart1.Dock = DockStyle.Fill;
        }
        private void InitializeChart()
        {
            Graphics3DDirect2D D2D = new Graphics3DDirect2D(tChart1.Chart);
            tChart1.Graphics3D = D2D;
            tChart1.Aspect.View3D = false;
            for (int i = 0; i < 4; i++)
            {
                new Line(tChart1.Chart);
                tChart1[i].FillSampleValues();
                tChart1[i].BeforeDrawValues += new PaintChartEventHandler(Form1_BeforeDrawValues);
                tChart1[i].AfterDrawValues += new PaintChartEventHandler(Form1_AfterDrawValues);
            }
            tChart1.Axes.Left.EndPosition = 25;
            Axis axis1 = new Axis(tChart1.Chart);
            tChart1.Axes.Custom.Add(axis1);
            tChart1[1].CustomVertAxis = axis1;
            axis1.StartPosition = 25;
            axis1.EndPosition = 50;
            Axis axis2 = new Axis(tChart1.Chart);
            tChart1.Axes.Custom.Add(axis2);
            tChart1[2].CustomVertAxis = axis2;
            axis2.StartPosition = 50;
            axis2.EndPosition = 75;
            Axis axis3 = new Axis(tChart1.Chart);
            tChart1.Axes.Custom.Add(axis3);
            tChart1[3].CustomVertAxis = axis3;
            axis3.StartPosition = 75;
        }
        void Form1_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            tChart1.Graphics3D.ClearClipRegions();
        }
        void Form1_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            Steema.TeeChart.Styles.Series s = sender as Steema.TeeChart.Styles.Series;
            int left = s.GetHorizAxis.IStartPos;
            int right = s.GetHorizAxis.IEndPos;
            int top = s.GetVertAxis.IStartPos;
            int bottom = s.GetVertAxis.IEndPos;
            tChart1.Graphics3D.ClipRectangle(left, top, right, bottom);
        } [created:2012-05-18T16:22:00.000+01:00 reported by:yeray@steema.com reported in version:Build 4.1.2012.05100 (TeeChart for .NET)]
Comment 1 christopher ireland 2013-11-28 06:30:09 EST
Problem had nothing to do with clipping not being implemented in Direct2D nor with the lack of content for the methods SetClipRegion, FillRegion or ClearClipRegions. It was a problem of the pushing and popping of multiple clip regions which has now been fixed. Thanks :-)
Comment 2 christopher ireland 2013-11-28 06:39:19 EST
In the code example please use:
tChart1.Graphics3D.UnClip();
instead of:
tChart1.Graphics3D.ClearClipRegions();