Exemplo n.º 1
0
        /// <summary>
        /// Implements the deep copy of the object.
        /// </summary>
        protected override object DeepCopy()
        {
            PlotArea plotArea = (PlotArea)base.DeepCopy();

            if (plotArea._lineFormat != null)
            {
                plotArea._lineFormat         = plotArea._lineFormat.Clone();
                plotArea._lineFormat._parent = plotArea;
            }
            if (plotArea._fillFormat != null)
            {
                plotArea._fillFormat         = plotArea._fillFormat.Clone();
                plotArea._fillFormat._parent = plotArea;
            }
            return(plotArea);
        }
Exemplo n.º 2
0
        void RenderPlotArea(PlotArea area, Rectangle rect)
        {
            PdfSharp.Charting.ChartFrame chartFrame = ((ChartFormatInfo)_renderInfo.FormatInfo).ChartFrame;

            XUnit top = rect.Y;
            top += area.TopPadding;

            XUnit bottom = rect.Y + rect.Height;
            bottom -= area.BottomPadding;

            XUnit left = rect.X;
            left += area.LeftPadding;

            XUnit right = rect.X + rect.Width;
            right -= area.RightPadding;

            chartFrame.Location = new XPoint(left, top);
            chartFrame.Size = new XSize(right - left, bottom - top);
            chartFrame.DrawChart(_gfx);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Parses the keyword «\plotarea» inside a chart.
        /// </summary>
        private void ParseArea(PlotArea area)
        {
            // Syntax:
            // 1.  \plotarea{...}
            // 2.  \plotarea[...]{...} //???

            try
            {
                ReadCode();
                if (Symbol == Symbol.BracketLeft)
                {
                    ParseAttributes(area, false);
                    ReadCode();
                }

                if (Symbol != Symbol.BraceLeft)
                    return;

                bool fContinue = true;
                while (fContinue)
                {
                    ReadCode();
                    switch (Symbol)
                    {
                        case Symbol.BraceRight:
                            fContinue = false;
                            break;

                        default:
                            // Alles ignorieren? Warnung ausgeben?
                            break;
                    }
                }
                AssertSymbol(Symbol.BraceRight);
                ReadCode(); // read beyond '}'
            }
            catch (DdlParserException pe)
            {
                ReportParserException(pe);
                AdjustToNextBlock();
            }
        }
Exemplo n.º 4
0
 protected void FlattenPlotArea(PlotArea plotArea)
 { }