public override void RenderPage(XGraphics gfx)
        {
            base.RenderPage(gfx);

            XGraphicsPath path = new XGraphicsPath();

            path.AddLine(50, 150, 50, 100);
            path.AddArc(50, 50, 100, 100, -180, 180);
            path.AddLine(150, 70, 200, 70);
            path.AddLine(200, 70, 200, 150);
            path.CloseFigure();
            path.Flatten(new XMatrix(), 0.1);
            gfx.DrawPath(properties.Pen2.Pen, properties.Brush2.Brush, path);
        }
        public void Flatten(XMatrix matrix, double flatness)
        {
            lock (this)
            {
                if (flattened)
                {
                    return;
                }
                flattened = true;

                XGraphicsPath path = this.Path;
                path.Flatten(matrix, flatness);

                m_pathDataPoints = path.Internals.GdiPath.PathPoints;
                m_pathDataTypes  = path.Internals.GdiPath.PathTypes;
            }
        }