Пример #1
0
        private void ProcessScatter(PdfPage page, Com.Delta.Print.Engine.Scatter chart)
        {
            try
            {
                if (chart.BackgroundColor != Color.Transparent && chart.MapAreaColor != Color.Transparent)
                {
                    PdfImage image = new PdfImage(pdfDocument.GetNextId, chart.Image, false);

                    image.Width   = Convert(chart.Width);
                    image.Height  = Convert(chart.Height);
                    image.Quality = System.Convert.ToInt64(chart.ExportQuality);

                    page.Add(image, Convert(chart.Bounds.X), Convert(chart.Bounds.Y), Convert(chart.Bounds.Width), Convert(chart.Bounds.Height));
                }
                else
                {
                    PdfImage image = pdfDocument.NewImage(chart.Image);

                    image.Width   = Convert(chart.Width);
                    image.Height  = Convert(chart.Height);
                    image.Quality = System.Convert.ToInt64(chart.ExportQuality);

                    page.Add(image, Convert(chart.Bounds.X), Convert(chart.Bounds.Y), Convert(chart.Bounds.Width), Convert(chart.Bounds.Height));
                }
            }
            catch (Exception e) {}
        }
Пример #2
0
        /// <summary>
        /// Clones the structure of the scatter element, including all properties.
        /// </summary>
        /// <returns><see cref="Com.Delta.Print.Engine.Scatter">Com.Delta.Print.Engine.Scatter</see></returns>
        public override object Clone()
        {
            Scatter tmp = new Scatter(this.X, this.Y, this.Width, this.Height, this.section);

            tmp.Layout          = this.Layout;
            tmp.BorderWidth     = this.BorderWidth;
            tmp.BorderColor     = this.BorderColor;
            tmp.mTitleFont      = this.mTitleFont;
            tmp.mTitle          = this.mTitle;
            tmp.ShowLegend      = this.ShowLegend;
            tmp.ShowMarkers     = this.ShowMarkers;
            tmp.MapAreaColor    = this.MapAreaColor;
            tmp.BackgroundColor = this.BackgroundColor;
            tmp.mLabelFont      = this.mLabelFont;
            tmp.ExportQuality   = this.ExportQuality;

            tmp.Name = "scatter" + tmp.GetHashCode().ToString();

            ArrayList tmpList = new ArrayList();

            foreach (ScatterSerie s in this.series)
            {
                tmpList.Add(s.Clone());
            }

            tmp.series = tmpList;

            return(tmp);
        }